Skip to content

Instantly share code, notes, and snippets.

@disklosr
Last active November 11, 2015 15:05
Show Gist options
  • Save disklosr/b97aac1051a5bb5bb3ab to your computer and use it in GitHub Desktop.
Save disklosr/b97aac1051a5bb5bb3ab to your computer and use it in GitHub Desktop.
using System;
#pragma warning disable 414, 3021
public class Program
{
/// <summary>The entry point to the program.</summary>
public static int Main(string[] args)
{
Console.WriteLine("Hello, World!");
string s = @"This
""string""
spans
multiple
lines!";
dynamic x = new ExpandoObject();
x.MyProperty = 2;
return 0;
}
}
async Task<int> AccessTheWebAsync()
{
// ...
string urlContents = await getStringTask;
return urlContents.Length;
}
internal static void ExceptionFilters()
{
try
{
throw new Exception();
}
catch (Exception e) when (e.Message == "My error") { }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment