[LoongArch64] Part-5:add loongarch support in some files for LoongArch64. (#21769)
[mono-project.git] / mcs / tests / gtest-anontype-06.cs
blobc7183acc0d6607f23c93b6137801e2b3334b4b59
3 // "cast by example" test
5 class CastByExample
7 public 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;