private static void Main(string[] args)
 {
     // NOTE: You can't cast the structs to IWriter here.
     var structs = Worker.DoSomething();
     // This will not compile:
     // (structs.FirstOrDefault() as IWriter).Property1 = 10
 }
Пример #2
0
 private static void Main(string[] args)
 {
     // NOTE: You COULD cast the structs to IWriter here.
     var structs = Worker.DoSomething();
 }