Just like the title says.
I\'ve tried doing str.Replace(\"\",\"0\"); but it gave me error because oldValue has zero length.
str.Replace(\"\",\"0\");
oldValue
Is it possi
You can simply return "0" for null, zero length or whitespace string using this one-liner:
"0"
return String.IsNullOrWhiteSpace(str) ? "0" : str;