An
Anonymous type is a simple class generated by the compiler within IL to store a
set of values. Var data type and new keyword is used to create an anonymous
type.
Eg:
Var
emp = new {Name=”SampleUser”, Address=”Banglore”};
The
anonymous type is very useful when we want to shape the result in our desired
form.
No comments:
Post a Comment