How set default value for argument?

R

Raj

Is there a way to set default value function/method arguments? Something like:
FindEmployees(string argName=="All")

FindEmployees("Raj");
FindEmployees();

Thank you

Regards
Raj
 
A

Arne Vajhøj

Is there a way to set default value function/method arguments? Something like:
FindEmployees(string argName=="All")

FindEmployees("Raj");
FindEmployees();

Today:
no

April 12th (supposed to be C# 4.0 / .NET 4.0 / VS 2010 release date):
yes

Syntax:
FindEmployees(string argName = "All")

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top