// Collection of code snippets by Arne Vajhøj // (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) using System; public class Data { private string? _s; public string? S { get { if(_s == null) { return "Bloody null"; } else { return _s; } } set { _s = value; } } } public class Program { public static void Main(string[] args) { Data o = new Data(); Console.WriteLine(o.S); o.S = "ABC"; Console.WriteLine(o.S); } }