Comparing two instances of a class

后端 未结 8 777
礼貌的吻别
礼貌的吻别 2020-12-03 17:33

I have a class like this

public class TestData
{
   public string Name {get;set;}
   public string type {get;set;}

   public List Members = ne         


        
8条回答
  •  旧时难觅i
    2020-12-03 18:09

    You can override the equals method and inside it manually compare the objects

    Also take a look at Guidelines for Overloading Equals() and Operator ==

提交回复
热议问题