Possible Duplicate:
Is there a way to omit out parameter?
Instead of:
SomeType param3;
SomeMethodCall(param1, param2, out param3);
I want not to define param3 in the case I don't need its value.
Is there any way to achieve this?
Possible Duplicate:
Is there a way to omit out parameter?
Instead of:
SomeType param3;
SomeMethodCall(param1, param2, out param3);
I want not to define param3 in the case I don't need its value.
Is there any way to achieve this?
If SomeMethodCall
is something you defined yourself then you can overload the method. If it's not then you can't.
No, you'll have to actually create a variable of the correct type if you want to use a function that takes an out
parameter.