Is there a way to auto-generate GetHashCode and Equals with ReSharper?

后端 未结 4 800
独厮守ぢ
独厮守ぢ 2021-02-05 00:48

In eclipse, when I code in Java, there is a feature to auto-generate a basic, efficient, and bug free implementation of hashCode() and equals() without

4条回答
  •  悲&欢浪女
    2021-02-05 01:23

    Since you asked if also Visual Studio can do that: since XI.2017 it finaly can generate something useful.

    Using ctr+. inside class and choosing "Generate Equals and GetHashCode"

    See https://stackoverflow.com/a/48441971/4547594

提交回复
热议问题