TypeExtensions IsAnonymousType Method The WebApiClient Documentation
Verifies whether it is an anonymous type object

Namespace: WebApiRestService
Assembly: WebApiClient (in WebApiClient.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public static bool IsAnonymousType(
	this Type type
)

Parameters

type
Type: System Type
The object type to be tested

Return Value

Type: Boolean
true if it is an anonymous type object

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Type. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Examples
var x = new { id = 1, name = "foo", lastName = "bar" };

bool result = x.GetType().IsAnonymousType(); //true
See Also