static void Main(string[] args) { strings_of_file.do_something current_do_something = delegate(string first, string second) { return String.Compare(first, second, true); }; string test_1 = "gggg kkkk jjj"; int test_1_res = test_1.IndexOf(' ', 7); strings_of_file test_object = new strings_of_file("test.txt", current_do_something); test_object.load_pointers_to_strings(); test_object.load_key_for_file(2); List<string> test_list_of_strings = new List<string>(); test_list_of_strings = test_object.get_string(2, "романов"); foreach (string current_string in test_list_of_strings) { Console.WriteLine(current_string); } Console.ReadKey(); /*string first_string = test_object[3]; string second_string = test_object[4]; string third_string = test_object[5]; foreach (string current_string in test_object) { Console.WriteLine(current_string); } string third_string2 = test_object[5];*/ }
public strings_of_file_enumerator(strings_of_file new_storage) { current_storage = new_storage; }