Skip to content

Instantly share code, notes, and snippets.

@creativ3lab
Last active October 9, 2020 08:30
Show Gist options
  • Save creativ3lab/1c020ead951520487f56428925941b6e to your computer and use it in GitHub Desktop.
Save creativ3lab/1c020ead951520487f56428925941b6e to your computer and use it in GitHub Desktop.
C#
int foo = 42; // Value type.
object bar = foo; // foo is boxed to bar.
int foo2 = (int)bar; // Unboxed back to value type.
using System;
class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Hello, world!");
Console.WriteLine("Is almost the same argument!");
}
}
using System;
using System.Drawing;
public class Example
{
public static Image img;
public static void Main()
{
img = Image.FromFile("Image.png");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment