-
-
Save gdyrrahitis/61c275fa979d9c4aff99a31cdb943a24 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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