static void Main(string[] args) { RandomList randomList = new RandomList { "a", "b", "c", "d" }; Console.WriteLine(randomList.RandomString()); }
static void Main(string[] args) { RandomList list = new RandomList() { "value1", "value2", "value3" }; object rndStr = list.RandomString(); Console.WriteLine(rndStr); }
static void Main() { RandomList randomList = new RandomList() { "pael", "sa", "ligael", "yambol", "tri", "moreta", "vitosha", "stud", "sofia" }; Console.WriteLine(randomList.RandomString()); Console.WriteLine(randomList.Count); Console.WriteLine(randomList.RandomString()); Console.WriteLine(randomList.Count); Console.WriteLine(randomList.RandomString()); Console.WriteLine(randomList.Count); Console.WriteLine(randomList.RandomString()); Console.WriteLine(randomList.Count); Console.WriteLine(randomList.RandomString()); Console.WriteLine(randomList.Count); }
public static void Main() { ArrayList listWithStrings = new ArrayList(); listWithStrings.Add("one"); listWithStrings.Add("two"); listWithStrings.Add("ondsadae"); listWithStrings.Add("twdsadao"); listWithStrings.Add("on4334e"); listWithStrings.Add("twerewro"); listWithStrings.Add("on34432423e"); listWithStrings.Add("t324242wo"); RandomList randList = new RandomList(); string removed = randList.RandomString(listWithStrings); Console.WriteLine(removed); }
static void Main() { var randomList = new RandomList(); randomList.Add("Bay"); randomList.Add("May"); randomList.Add("Kay"); randomList.Add("KAy"); randomList.Add("KaY"); randomList.RemoveRandomString(); randomList.RemoveRandomString(); randomList.RemoveRandomString(); randomList.RemoveRandomString(); for (int i = 0; i < 5; i++) { Console.WriteLine(randomList.RandomString()); } }
static void Main(string[] args) { RandomList randomList = new RandomList(); randomList.Add("test 1"); randomList.Add("test 2"); randomList.Add("test 3"); Console.WriteLine("Total Items: "); foreach (string s in randomList) { Console.WriteLine(s); } Console.WriteLine($"Item Removed: {randomList.RandomString()}"); Console.WriteLine("Item Remains: "); foreach (string s in randomList) { Console.WriteLine(s); } }
static void Main() { RandomList rdList = new RandomList(); Console.WriteLine(rdList.RandomString()); }
public static void Main() { RandomList randomList = new RandomList(); randomList.RandomString(); }
static void Main(string[] args) { RandomList randomList = new RandomList(); randomList.RandomString(); }