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(""); }
private static void PrintCustoStringValue(CustomString example) { Console.Write("CustomString value: "); foreach (var item in example.Value()) { Console.Write(item.ToString()); } Console.Write("\n"); }