public static string GetText(this CodeProperty2 prop, vsCMPart part = vsCMPart.vsCMPartWholeWithAttributes) { try { var p = prop.GetStartPoint(part); if (p == null) { return(""); } return(p.CreateEditPoint().GetText(prop.GetEndPoint(part))); } catch (Exception ex) { if (ex is COMException || ex is NotImplementedException) { return(""); } throw; } }