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(""); }
static void Main(string[] args) { var example = new CustomString(new char[] { '1', '2', '3', '4', '5' }); var length = example.Length(); Console.WriteLine("CustomString length: " + length); PrintCustoStringValue(example); Console.WriteLine("CustomString value after reverse."); example.Reverse(); PrintCustoStringValue(example); }