int? i = (int?)(from LLLabel s in sheetCanvas.Children where s.Id == l.Id select s) >> .Max(x => x.GetValue(CMProp.StampIndexProperty));or
var v = s.Split(new Char[] { ' ' }).Select(x => x).Where(x => x.Length > 0);I sort of like the first one - nullable type, a bit of Linq, an extension method using a lambda expression with an attached dependency property - but the last bit is WPF specfic so perhaps shouldn't count.