What i need. I have a list of objects(list of icons). This data contain duplicate objects(since the same icons is used multiple times same property will repeat).so the ids of multiple object might be same. I need to loop this list with foreach and assign a unique id (named uniquid ) property to each object and add to a list.
problem when I try to assign uniqueId to each object, duplicate objects will update with same unique id. How can i restrict this? i need all the objects should have a unique value in uniqueid property
List<icons> icons = new List<icons>();
foreach (var single in fullList)
{
Guid id = Guid.NewGuid();
single.uniquid = id;
icons.Add(single);
}
here full list is also the List<icons>