int? myIntValue = null; public string GetIntValue() { return myIntValue.HasValue ? myIntValue.Value.ToString() : "-"; }
int specialValue = '-';
specialValue
int? i = null; Console.WriteLine(i==null?"-":i.ToString();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)