Horje
c# adding to a list Code Example
how to add to a list c#
var list = new List<string>();
list.Add("Hello");
c# adding to a list
//Declaring that its a list
List<string> test = new List<string>(); 
test.Add("Hello")
c# add list to list
using System;
using System.Collections.Generic;

namespace add_list
{
        static void Main(string[] args)
        {
            List<string> first = new List<string> { "do", "rey", "me" };
            List<string> second = new List<string> { "fa", "so", "la", "te" };
            first.AddRange(second);
            foreach(var e in first)
            {
                Console.WriteLine(e);

            }
        }
    }
}
List C# add from List
List<string> initialList = new List<string>();
// Put whatever you want in the initial list
List<string> listToAdd = new List<string>();
// Put whatever you want in the second list
initialList.AddRange(listToAdd);




Csharp

Related
get index c# Code Example get index c# Code Example
c# linq select from object list Code Example c# linq select from object list Code Example
make window not resizable wpf Code Example make window not resizable wpf Code Example
List string to file C# Code Example List string to file C# Code Example
c# itext 7 pdf add pdf Code Example c# itext 7 pdf add pdf Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
13