Exemple #1
0
        public void node()
        {
            CustomLinkedListString custom = new CustomLinkedListString();

            custom.word = "Hello";
            custom.Length();
            custom.Insert(custom.word);
            custom.Remove(2, 2);
            custom.ToString();
            Console.WriteLine(custom.newword);
        }
Exemple #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("SystemString");
            SystemString systemString = new SystemString("Hello");
            Console.WriteLine(systemString.Length());
            systemString.Insert(5, " World!");
            Console.WriteLine(systemString);
            systemString.Insert(5, ",");
            Console.WriteLine(systemString);
            systemString.Remove(0, 7);
            Console.WriteLine(systemString);

            Console.WriteLine("SystemArrayString");
            SystemArrayString systemArrayString = new SystemArrayString("Hello");
            Console.WriteLine(systemArrayString.Length());
            systemArrayString.Insert(5, " World!");
            Console.WriteLine(systemArrayString);
            systemArrayString.Insert(5, ",");
            Console.WriteLine(systemArrayString);
            systemArrayString.Remove(0, 7);
            Console.WriteLine(systemArrayString);

            Console.WriteLine("SystemLinkedListString");
            SystemLinkedListString systemLinkedListString = new SystemLinkedListString("Hello");
            Console.WriteLine(systemLinkedListString.Length());
            systemLinkedListString.Insert(5, " World!");
            Console.WriteLine(systemLinkedListString);
            systemLinkedListString.Insert(5, ",");
            Console.WriteLine(systemLinkedListString);
            systemLinkedListString.Remove(0, 7);
            Console.WriteLine(systemLinkedListString);

            Console.WriteLine("CustomSystemLinkedListString");
            CustomLinkedListString customLinkedListString = new CustomLinkedListString("Hello");
            Console.WriteLine(customLinkedListString);
            Console.WriteLine(customLinkedListString.Length());
            customLinkedListString.Insert(5, " World!");
            Console.WriteLine(customLinkedListString);
            Console.WriteLine(customLinkedListString.Length());
            customLinkedListString.Insert(5, ",");
            Console.WriteLine(customLinkedListString);
            Console.WriteLine(customLinkedListString.Length());
            customLinkedListString.Remove(0, 7);
            Console.WriteLine(customLinkedListString);
            Console.WriteLine(customLinkedListString.Length());

            Console.ReadKey();
        }