I am newbie in unity and use C#, actually i am python developer i try to make a list which can holds only unique Values and if some duplicate value come it will not allow to enter in list
List<int> iList = new List<int>();
iList.Add(2);
iList.Add(3);
iList.Add(5);
iList.Add(7);
list =[2,3,5,7]
**in python we just do this to avoid duplicate in list **
if(iList.indexof(value)!=-1){
iList.append(value)
}
But what should we do in C# to achieve very similar results Thanks Your effort will be highly appreciated