fork download
  1. using System.IO;
  2. using System;
  3. using System.ComponentModel;
  4. using System.Linq.Expressions;
  5. using System.Collections.Generic;
  6.  
  7. class Program
  8. {
  9. public string Abc {get; set; }
  10. void M()
  11. {
  12. Console.WriteLine("Hello, World!");
  13. Expression<Func<string>> v = () => Abc;
  14. var p = (v.Body as MemberExpression).Member;
  15. string s = null;
  16. Console.WriteLine(p==null);
  17. }
  18. static void Main()
  19. {
  20. var p = new Program();
  21. //p.M();
  22. var l = new List<string>();
  23. string s = "ad";
  24. l.Add(s);
  25. l.Add(s);
  26. Console.WriteLine(l.Count);
  27. //Expression<Func<string>> v = () => Abc;
  28. //Console.WriteLine(v.Name);
  29. }
  30. }
  31.  
Success #stdin #stdout 0.01s 29672KB
stdin
Standard input is empty
stdout
2