In C#, I would normally use multiple forms of the method:
void GetFooBar(int a) { int defaultBValue; GetFooBar(a, defaultBValue); }
void GetFooBar(int a, int b)
{
// whatever here
}
Soluion 2:
using System.Runtime.InteropServices;
public void Foo(int a, int b, [Optional] int c)
{
...
}
Solution 3:
public void DoSomething(params object[]
theObjects)
{
foreach(object o in theObjects)
{
// Something with the Objects…
}
}
...
DoSomething(this, that, theOther);