Skip to content

Instantly share code, notes, and snippets.

@DaRaFF
Created June 3, 2011 12:13
Show Gist options
  • Save DaRaFF/1006244 to your computer and use it in GitHub Desktop.
Save DaRaFF/1006244 to your computer and use it in GitHub Desktop.
Boxing / unboxing of types in C#
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