Defining Simple Anoymous Type in C#

This content was proof-read by Grammarly. You can Try Grammary for FREE

To define an anonymous type in C# , we can use the var keyword . The syntax for defining the anonymous type in C# is as follows

var <variableName> = <Non-NULL Value>


var WebsiteName = "";

In the MSIL , the above code is similar to

string WebsiteName = "";
%d bloggers like this: