Skip to content

Instantly share code, notes, and snippets.

@gdyrrahitis
Created June 22, 2019 15:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gdyrrahitis/61c275fa979d9c4aff99a31cdb943a24 to your computer and use it in GitHub Desktop.
Save gdyrrahitis/61c275fa979d9c4aff99a31cdb943a24 to your computer and use it in GitHub Desktop.
public void CastingInterface()
{
int num1 = 10;
object o1 = num1;
int num2 = 12;
IComparable comp2 = num2;
int result = comp2.CompareTo(o1);
Console.WriteLine(result);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment