Program With Type Inference And AnonymousType Feature


using System;

class ProgramWithTypeInferenceAndAnonymousType
{
public static void Main()
{
var emp = new {Id="1", Name="Amit",Address="#123"};

Console.WriteLine("Id is " + emp.Id);
Console.WriteLine("Name is " + emp.Name);
Console.WriteLine("Address is " + emp.Address);

}
}

OUTPUT




Program With Type Inference And AnonymousType Feature Program With Type Inference And AnonymousType Feature Reviewed by Baljeet Singh on 10:19 Rating: 5

No comments:

Powered by Blogger.