//C# Argument Passing Procedures en Functies public class Example1 { public virtual void Main() { this.Test1("Hello", "World"); this.Test2(); this.Test2(10); this.Test2(0, 20); this.Test2(0, 0, 30); this.Test2(10, 20); this.Test2(10, 0, 30); this.Test2(0, 20, 30); this.Test2(10, 20, 30); Console.ReadLine(); } public virtual void Test1(string argument1, string argument2) { Console.WriteLine(((argument1 + " ") + argument2)); } public virtual void Test2(int argument1, int argument2, int argument3) { Console.WriteLine(((argument1 + argument2) + argument3)); } } public class Example2 { public virtual void Main() { Example1.Test1("Hello", "World"); Example1.Test1("World", "Hello"); Example1.Test1("Hello", "World"); Example1.Test2(20); Example1.Test2(10, 30); Example1.Test2(10, 30); Example1.Test2(30, 10); Console.ReadLine(); } } //Bezoek www.vbvoorbeelden.be voor meer C# voorbeelden. //Copyright - De Wolf / vbvoorbeelden - 2003-2011 - Alle rechten voorbehouden.