4
Answers

can not the "string.Empty" as the default parameter method?

Hi
To all users
When the value of "string.Empty" parameter method I use, I encountered the following error:
 
Error 1 Default parameter value for 'Name' must be a compile-time constant.
 
public void SetName(string Name = string.Empty)
{
   this.mName = Name;
}
 
 
thanks.
Answers (4)
Next Recommended Forum