I have the following model class:
public class DuplicateTags
{
public string VMName { set; get; }
public string shortName { set; get; }
}
It is being populated as follow:
int tempindex = tempvmname.IndexOf('-');
duplicateTagsInDisplayName.Add(new DuplicateTags
{
VMName = tempvmname,
shortName = tempvmname.Substring(0, tempindex)
});
Now I want to display the list items that have duplicate shortName?