Skip to content

Instantly share code, notes, and snippets.

@sasan-salem
Created March 31, 2021 07:32
Show Gist options
  • Save sasan-salem/900131af0bac7b661be088e4e5ad9a9e to your computer and use it in GitHub Desktop.
Save sasan-salem/900131af0bac7b661be088e4e5ad9a9e to your computer and use it in GitHub Desktop.
public override bool Equals(object obj)
{
if (obj is Student student)
{
if (student.SerialNo == SerialNo)
return true;
else
return false;
}
else
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment