C#でリストの重複を削除したり(Distinct)、辞書のキーとしてオブジェクトを使ったりする際、**「2つのオブジェクトが同じかどうか(等価性)」**の判定が重要になります。 通常は、そのクラス自身に Equals メソッドなどを実装して、「IDが同じなら同じと ...
record型が導入された! C# 9.0からrecord型が導入されましたので、その使い方の一例として、Dictionaryのキーとして使うことを本稿では考えてみます。 これまでは、Dictionaryのキーとしてプリミティブな型(stringとか)以外のものを使いたい場合は、classを実装し ...
If yml has a way to specify which property of the mutable type is the key, that could help decide what should be in GetHashCode. I just tried setting my id property isId: true and that produced no ...
Reason/Context In Modelina for C#, you can make it generate the models with the GetHashCode method overwritten, this should be possible through the CLI. To do this I suggest we add a flag called ...
一部の結果でアクセス不可の可能性があるため、非表示になっています。
アクセス不可の結果を表示する