Skip to main content

Posts

Showing posts with the label C# List Examples

C# List Examples

C# List Examples 1. Adding values ~~~ Program that adds elements to List (C#) ~~~ using System.Collections.Generic; class Program {       static void Main()       {             List list = new List();             list.Add(2);             list.Add(3);             list.Add(5);             list.Add(7);       } } *********************************************************************************** 2. Adding objects. Using Add method ~~~ Program that uses Add method (C#) ~~~ using System.Collections.Generic; class Program {       static void Main()    ...