public static void Main(string[] args) { Console.WriteLine("Hello Digimon!"); Digimon d1 = new Digimon("bianca"); Digimon d2 = new Digimon("silvana"); var p = new Program(); p.Fight(d1, d2); }
static void Main(string[] args) { Digimon a = new Digimon("Rawr"); Digimon b = new Digimon("Grrrr"); Digimon c = new Digimon("This is stupidly easy"); Fight(a, b); Fight(b, a); Fight(a, c); Fight(c, a); Fight(b, c); Fight(c, b); }
public void Fight(Digimon a, Digimon b) { Console.WriteLine("{0} fights {1}", a, b); }
private void Fight(Digimon a, Digimon b) { System.Console.WriteLine("{0} is fighting with {1}", a, b); }
public static void Fight(Digimon one, Digimon two) { }
//if Fight is static, it doesn't work public void Fight(Digimon a, Digimon b) { System.Console.WriteLine("{0} fights {1}", a.name, b.name); }
public static void Fight(Digimon _one, Digimon _two) { System.Console.WriteLine("Digimon {0} and {1} are fighting!", _one.name, _two.name); }
public static void Fight(Digimon a, Digimon b) { System.Console.WriteLine("{0} fights {1}", a, b); }