Здравствуйте, Какая разница, Вы писали:
КР>Показывает сабжевый хинт на выделенный StartWith
КР>Label — string property
Теоритически значение может поменяться между вызовами
КР>КР> Label = doc.GetType().InvokeMember("FullName", BindingFlags.GetProperty, null, doc, null) as string;
КР> if (!string.IsNullOrEmpty(Label) && Label.StartsWith(@"@:\"))
КР> {
КР> var ext = Path.GetExtension(Label);
КР> if (!string.IsNullOrEmpty(ext))
КР> {
КР> var index = ext.IndexOf('_');
КР> if (index >= 0)
КР> Label = Label.Substring(0, Label.Length - (ext.Length - index));
КР> }
КР> }
КР>
var label = Label;
if (!string.IsNullOrEmpty(label) && label.StartsWith(@"@:\"))
{
var ext = Path.GetExtension(label);
if (!string.IsNullOrEmpty(ext))
{
var index = ext.IndexOf('_');
if (index >= 0)
Label = label.Substring(0, label.Length - (ext.Length - index));
}
}
... << RSDN@Home 1.2.0 alpha 5 rev. 56>>