var names = new List<string>();
names.Add("Brandon");
names.Add("Harry");
var list = new List<string>();
list.Add("Hello");
//Declaring that its a list
List<string> test = new List<string>();
test.Add("Hello")
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<string> names = new List<string>();
names.Add("Bob");
List<geo_tag> abc = new List<geo_tag>();
geo_tag tag = new geo_tag();
tag.latitude = 111;
tag.longitude = 122;
tag.unit = "SSS";
abc.Add(tag);
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);
let newlist = elem :: tail;;