Say I have the below example, the syntax is based off constuctor chaining for clarity (and my cluelessness).
public static void Feed() : this("Unknown"){}
public static void Feed(string FoodType)
{
if (Food != "Unknown")
Console.WriteLine("{0} eats some {1}.", Name, Food);
}
How would I actually implement this for methods? It is of the same style as constructor chaining, that if nothing is passed to the Feed
method it will pass Unknown
to the latter Feed method.
Such a simple question but its bugging me lol.