Add objects to a list without using loop

public class inputlist 
{
       public string name {get;set;}
       public int sortorder {get;set;}
}

List<inputlist > inputParam = new List<inputlist>
{
      new inputlist { name = "Apple", sortorder =1},
      new inputlist { name = "Google", sortorder =2},
      new inputlist { name = "Facebook", sortorder =3}  
};

Last updated