阅读背景:

使用c# struct作为字典键的最优方法是什么?

来源:互联网 

I have a C# struct which I use as the key in a standard Dictionary collection. I've written overrides for both its GetHashCode and Equals, but I'm a little unhappy that Equals is given a boxed object instead of a reference to my struct type directly. I have a C# struct which I use as the key in a




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: