| 1 |
using System; |
| 2 |
|
| 3 |
#pragma warning disable 414, 3021 |
| 4 |
|
| 5 |
public class Program |
| 6 |
{ |
| 7 |
/// <summary>The entry point to the program.</summary> |
| 8 |
public static int Main(string[] args) |
| 9 |
{ |
| 10 |
Console.WriteLine("Hello, World!"); |
| 11 |
string s = @"This |
| 12 |
""string"" |
| 13 |
spans |
| 14 |
multiple |
| 15 |
lines!"; |
| 16 |
|
| 17 |
dynamic x = new ExpandoObject(); |
| 18 |
x.MyProperty = 2; |
| 19 |
|
| 20 |
return 0; |
| 21 |
} |
| 22 |
} |
| 23 |
|
| 24 |
async Task<int> AccessTheWebAsync() |
| 25 |
{ |
| 26 |
// ... |
| 27 |
string urlContents = await getStringTask; |
| 28 |
return urlContents.Length; |
| 29 |
} |
| 30 |
|
| 31 |
internal static void ExceptionFilters() |
| 32 |
{ |
| 33 |
try |
| 34 |
{ |
| 35 |
throw new Exception(); |
| 36 |
} |
| 37 |
catch (Exception e) when (e.Message == "My error") { } |
| 38 |
} |