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.

Saroj Kumar SahuRank #1,766 · 849 reputationPosted Jun 22, 2015, 9:35 PM EDT
Ramesh MaruthiRank #937 · 2.2K reputationPosted Jun 22, 2015, 8:20 AM EDT
behzad pakniyat94 reputationPosted Jun 22, 2015, 12:18 PM EDT
Dear user
I would not use the default value for the parameter.
Pankaj Kumar ChoudharyRank #80 · 24.4K reputationPosted Jun 22, 2015, 4:31 PM EDT
{
this.mName= string.Empty ?? Name;
}