Created
June 3, 2011 12:13
-
-
Save DaRaFF/1006244 to your computer and use it in GitHub Desktop.
Boxing / unboxing of types in C#
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
int i = 123; | |
object o = i; // boxing -> type of o is System.Int32 | |
int j = (int)o; // unboxing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment