projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Bump mono-extensions to fix build break (#5677)
[mono.git]
/
mcs
/
tests
/
gtest-anontype-06.cs
1
2
3
// "cast by example" test
4
5
class CastByExample
6
{
7
public static void Main()
8
{
9
object o = new { Foo = "Data" };
10
// Cast object to anonymous type
11
var typed = Cast(o, new { Foo = "" });
12
}
13
14
static T Cast<T>(object obj, T type)
15
{
16
return (T)obj;
17
}
18
}