private void FormLaiKey_Load(object sender, EventArgs e) { LaiKey lk = new LaiKey(); lk.Key = "1"; lk.Lai = "2"; bool isok = lk.Equals(lk); txtMSg.Text = isok.ToString(); }
public override bool Equals(object obj) { LaiKey lk = (LaiKey)obj; return(lk.Lai == lk.Key); }