Exemplo n.º 1
0
        public void arrayString()
        {
            SystemArrayString ArrayString = new SystemArrayString();

            ArrayString.word = "Hi Applebees";
            ArrayString.Length();
            ArrayString.Insert(ArrayString.word);
            ArrayString.Remove(3, 4);
            ArrayString.ToString();
            Console.WriteLine(ArrayString.newword);
        }
Exemplo n.º 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();
        }