Click here to Skip to main content
15,892,575 members

Comments by Member 14224038 (Top 15 by date)

Member 14224038 19-Apr-24 3:49am View    
OK so i should add string "ABCDEFGHIJKLMNOPQRSTUVWXYZ" & will do c-1 thanks
Member 14224038 12-Apr-24 10:13am View    
ah sorry
thanks for the answers guys but i think it wont work when i have multiple objects of same type

So my primary array is like below

(cmp1.name, nut)
(cmp2.name, bolt)
(cmp1.name, nut)
(cmp3.name, washer)
(cmp1.name, nut)
(cmp1.name,nut)
(cmp3.name, washer)

I can have the key & I can have mulitple values in arraylist again & when i say below
if (!uniqueComp.TryGetValue(cmp1[i].name, out List<object> list))
{
list = new List<object>();
uniqueComp.Add(cmp1[i].name, list);
}
there will be new list & delete already old entry for cmp1.name (key) ?
SO i am looking to group nut, bolt, washer in above case.
So the output would be like
(key(cmp1.name, list of(nut)x4))
(key(cmp2.name, list of(bolt)x1))
(key(cmp3.name,list of(washer)x2))
Member 14224038 12-Apr-24 10:13am View    
thanks for the answers guys but i think it wont work when i have multiple objects of same type

So my primary array is like below

(cmp1.name, nut)
(cmp2.name, bolt)
(cmp1.name, nut)
(cmp3.name, washer)
(cmp1.name, nut)
(cmp1.name,nut)
(cmp3.name, washer)

I can have the key & I can have mulitple values in arraylist again & when i say below
if (!uniqueComp.TryGetValue(cmp1[i].name, out List<object> list))
{
list = new List<object>();
uniqueComp.Add(cmp1[i].name, list);
}
there will be new list & delete already old entry for cmp1.name (key) ?
SO i am looking to group nut, bolt, washer in above case.
So the output would be like
(key(cmp1.name, list of(nut)x4))
(key(cmp2.name, list of(bolt)x1))
(key(cmp3.name,list of(washer)x2))
Member 14224038 26-Mar-24 10:12am View    
that i can see is already there in reference, i will try more thanks
Member 14224038 26-Mar-24 9:55am View    
Ok i try to debug i got below error after it goes below line
List<int> keysToRemove = counts1.Keys.Except(duplicateKeys).ToList();
Could not load file or assembly 'Microsoft.Bcl.HashCode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.'