Q:

How to set multiple values of properties inside an object in C#?

Please tell me how to add multiple properties inside an single object.
like- if there is a class having 5 variables defined with get and set.
I want to add like 2 values for each variable through a single object of that class like
class Info{
    int count{get , set,};
    string name{get , set,};
    string Dept {get , set,};
    string Address {get , set,};
    long contact {get , set,};
  info obj =new Info();
  /* Now after this I want to take 2 rows like 
    in first row I want to set it's values through a single object 
      Count=1,name="Robert",Dept="Computer",Address="India",Contact=434343
    in row 2nd row
      Count=1,name="Robbin",Dept="Electronic",Address="Colombo",Contact=54545                                    
  */  
}

/// Now please explain me how to set like above two rows values inside one object..  /// 

A:

I think what you're looking for is inline object initialization: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/how-to-initialize-objects-by-using-an-object-initializer
You can write it on a single line but the code would look better if you break it into multiple lines:
Info infoObj = new Info
{
    Count = 1,
    Name = "Robert",
    Dept = "Computer",
    Address = "India",
    Contact = 434343
};

