static void PrintInfo(IInfo item) // pass objects as references to the interface { Console.WriteLine("Name: {0} Age: {1}", item.GetName(), item.GetAge()); }
static void PrintInfo(IInfo item) { Console.WriteLine("Name: {0}, Age {1}", item.GetName(), item.GetAge()); }
private static void PrintInfo(IInfo info) { Console.WriteLine("name: {0}, age: {1}", info.GetName(), info.GetAge()); }
static void PrintInfo(IInfo item) { Console.WriteLine("Name: {0}, Age: {1}", item.GetName(), item.GetAge()); }
public static string PrintInfo(IInfo info) { return(info.GetName() + info.GetAge()); }
static void PrintInfo(IInfo item) // IMPORTANT. { Console.WriteLine("Name: {0}, Age: {1}", item.GetName(), item.GetName()); }
static void PrintInfo(IInfo item) { Console.WriteLine($"Name: { item.GetName() }, Age: { item.GetAge() }"); }
public static void PrintInfo(IInfo obj) { Console.WriteLine("Name: " + obj.GetName() + " Age: " + obj.GetAge()); }