public void ShowChildExampleDeclaredAsParent() { MethodOverloading.Parent typeParent = new MethodOverloading.Child(); MethodOverloading.Child typeChild = (MethodOverloading.Child)typeParent; System.Diagnostics.Debug.WriteLine("Variable type parent"); System.Diagnostics.Debug.WriteLine(typeParent.FormatMessage("Hello World")); System.Diagnostics.Debug.WriteLine(""); System.Diagnostics.Debug.WriteLine("Variable type child"); System.Diagnostics.Debug.WriteLine(typeChild.FormatMessage("Hello World")); }
public void ShowChildAppendExample() { var child = new MethodOverloading.Child(); System.Diagnostics.Debug.WriteLine(child.AppendAndFormat("Hello World", "!")); }
public void ShowChildExample() { var child = new MethodOverloading.Child(); System.Diagnostics.Debug.WriteLine(child.FormatMessage("Hello World")); }