default.txt 654 B

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