this one has been passing for quite a while now
[mcs.git] / tests / gtest-anontype-06.cs
blobcacb85a73140f9a3304128cbeac3b8de4bf146a0
3 // "cast by example" test
5 class CastByExample
7 static void Main()
9 object o = new { Foo = "Data" };
10 // Cast object to anonymous type
11 var typed = Cast(o, new { Foo = "" });
14 static T Cast<T>(object obj, T type)
16 return (T)obj;