> For the complete documentation index, see [llms.txt](https://roshan-kr-grg.gitbook.io/blog/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://roshan-kr-grg.gitbook.io/blog/programming/.net/add-objects-to-a-list-without-using-loop.md).

# 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}  
};
```
