Possible Duplicates:
How To Test if a Type is Anonymous?
Anonymous Types - Are there any distingushing characteristics?
Is there a way to detect if a Type object refers to an anonymous object?
var obj = new { A = "Hello" };
Type x = obj.GetType();
// is there something equivalent to x.IsAnonymous?
Assert.IsTrue(x.IsAnonymous);