private string Intern(string value) { if (value == null) { return(null); } if (value.Length == 0) { return(string.Empty); } string found; if (stringInterner == null) { stringInterner = new System.Collections.Generic.Dictionary <string, string>(); stringInterner.Add(value, value); } else if (stringInterner.TryGetValue(value, out found)) { value = found; } else { stringInterner.Add(value, value); } return(value); }