Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- namespace ConsoleTests
- {
- class ConsoleTests
- {
- private static List<string> phrases = new List<string>()
- {
- "The product is excellent.",
- "This is a great product.",
- "I use this product constantly.",
- "This is the best product from this category."
- };
- private static List<string> stories = new List<string>()
- {
- "Now I feel better.",
- "I managed to change.",
- "It made some miracle.",
- "I can’t believe it, but now I am feeling great.",
- "You should try it, too. I am very satisfied."
- };
- private static List<string> firstNames = new List<string>()
- {
- "Dayan",
- "Stella",
- "Hellen",
- "Kate"
- };
- private static List<string> lastNames = new List<string>()
- {
- "Johnson",
- "Peterson",
- "Charls"
- };
- private static List<string> cities = new List<string>()
- {
- "London",
- "Paris",
- "Berlin",
- "New York",
- "Madrid"
- };
- static void Main()
- {
- var GlobalStrings = new List<List<string>>();
- GlobalStrings.Add(phrases);
- GlobalStrings.Add(stories);
- GlobalStrings.Add(firstNames);
- GlobalStrings.Add(lastNames);
- GlobalStrings.Add(cities);
- Random test = new Random();
- List<string> result = new List<string>();
- foreach (var globalString in GlobalStrings)
- {
- int index = test.Next(globalString.Count());
- result.Add(globalString[index]);
- }
- Console.WriteLine("{0} {1} -- {2} {3}, {4}", result[0],result[1],result[2],result[3],result[4]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment