For a project I need to change a string affected to null or a white space to default. In my head this code makes sense but what am I missing? It just return a whitespace like it hasnt changed at all. I'm new to programming and I'm looking for help. Thank you :).
static void Main(string[] args)
{
string s = "";
ValidateString(s);
Console.WriteLine(s);
}
static string ValidateString(string s)
{
if (s == null || String.IsNullOrWhiteSpace(s))
s = "défault";
return s;
}