Exemple #1
0
 private static void Demo(CustomString customString)
 {
     Console.WriteLine("CustomString before RemoveSymbol method");
     Console.WriteLine("Value: " + new string(customString.Value()));
     Console.WriteLine("Length: " + customString.Length());
     customString.RemoveSymbol();
     Console.WriteLine("CustomString after RemoveSymbol method");
     Console.WriteLine("Value: " + new string(customString.Value()));
     Console.WriteLine("Length: " + customString.Length());
     Console.WriteLine("");
 }
Exemple #2
0
        private static void PrintCustoStringValue(CustomString example)
        {
            Console.Write("CustomString value: ");

            foreach (var item in example.Value())
            {
                Console.Write(item.ToString());
            }
            Console.Write("\n");
        }