Comparing two instances of a class

后端 未结 8 776
礼貌的吻别
礼貌的吻别 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条回答
  •  孤城傲影
    2020-12-03 18:14

    You will need to define the rules that make object A equal to object B and then override the Equals operator for this type.

    http://msdn.microsoft.com/en-us/library/ms173147(v=vs.80).aspx

提交回复
热议问题