I'm replacing a series of method overloads with a handful of methods with named and optional parameters.
While this is causing no problem, I am finding that there's a spanner in the works while using 'out'.
e.g.
if I was to call :
foo(int a, out int b, int c = -1, string d = "") The compiler throws an error, as any time I call this method, it doesn't see it or recognise it as a relevant signature for this method.
I realise that any optional paramaters HAVE TO come after the mandatory ones -> is there any such rule for parameters with 'out', or am I missing anything obvious?
foo(int a, out int b, int c = -1, string d = "")doesn't look a valid method definition to me, and it's certainly NOT a valid invocation. How about you show us your real code?... EDIT: Ah, it's new .NET4/VS2010 syntax. I haven't had the pleasure yet... Hell we're still upgrading from 1.1 to 2.0 ;-)