Optional Parameters like VB in C#
Posted on 2007-04-02
This may be a silly question, but:
Is there a way in C# to do a function call with an OPTIONAL argument like in VB?
For instance, in VB I can do this:
Public Function SubName(strName as string, optional strEmail as string = "") as Boolean
SubName = False
If strEmail <> "" then
SubName = True
How can I do this in C#?