Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# add multiple items to list

var names = new List<string>();
names.Add("Brandon");
names.Add("Harry");
Comment

c# add multiple items to list

List<Person> listofPersons = new List<Person>();
listofPersons.AddRange(new List<Person>
{
    new Person("John1", "Doe" ),
    new Person("John2", "Doe" ),
    new Person("John3", "Doe" ),
 });
Comment

PREVIOUS NEXT
Code Example
Csharp :: wpf app how to get all elements which are exposed to script 
Csharp :: check if internet is connected with c# winforms 
Csharp :: c# sort array of objects 
Csharp :: unity 3d camera movement script 
Csharp :: c# how to fill a datatable 
Csharp :: divide string in chunks c# 
Csharp :: convert string to number c# 
Csharp :: generate entity model dot net core 
Csharp :: particle system start color 
Csharp :: instantiate unity in parent 
Csharp :: c# string from b64 
Csharp :: c# break from foreach method 
Csharp :: unity print vs debug log 
Csharp :: get current time c# 
Csharp :: float and int need help 
Csharp :: basic auth swagger .net core 5 
Csharp :: c# convert list t to datatable 
Csharp :: dotnet core 3.1 get the user that just logged in 
Csharp :: how to disable vsync in monogame 
Csharp :: how to make an ui to follow gameobject 
Csharp :: c# list of properties from list of objects 
Csharp :: convert list of tuples to dictionary c# 
Csharp :: c# windows forms open directory in explorer 
Csharp :: c# excel close workbook 
Csharp :: if checkbox checked in c# 
Csharp :: how to find current country c# 
Csharp :: C# clear form 
Csharp :: c# encrypted 
Csharp :: replace first occurrence of character in string c# 
Csharp :: how to find the multiples of 3 c# 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =