Skip to content

Instantly share code, notes, and snippets.


gdyrrahitis/boxing.cs Secret

Created Jun 22, 2019
What would you like to do?
public void CastingInterface()
int num1 = 10;
object o1 = num1;
int num2 = 12;
IComparable comp2 = num2;
int result = comp2.CompareTo(o1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment