Horje
example of List c# Code Example
example of List c#

			List<string> listOfString = new List<string>();
			listOfString.Add("georgel");
			listOfString.Add("marcel");
			for (int i = 0; i < listOfString.Count; i++)
			{
				Console.WriteLine("the strings are: " + listOfString[i]);
			}

			List<User> listOfUser = new List<User>()
			{
                new User() { Name = "john", Age = 22 },
				new User() { Name = "john", Age = 44 },

			};

			for (int i = 0; i < listOfUser.Count; i++)
            {
				Console.WriteLine("the name is: " + listOfUser[i].Name + " and the age is: " + listOfUser[i].Age);
            }
            
            //USER CLASS
           class User
    		{
       		 public string Name { get; set; }
       		 public int Age { get; set; }
   			 }




Csharp

Related
unity control physics of multiple simulation Code Example unity control physics of multiple simulation Code Example
c# search on google Code Example c# search on google Code Example
telerik wpf gridviewcombobox itemsource property on item Code Example telerik wpf gridviewcombobox itemsource property on item Code Example
conevrt list to pipe separated string c# Code Example conevrt list to pipe separated string c# Code Example
how to print a word in C# Code Example how to print a word in C# Code Example

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