TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
kris
NA
26
20k
Argument Exception: "An item with the same key has already b
Mar 17 2015 4:42 PM
I have an application which got hung when i tried to add items to it.
I get a runtime error:
An
item with the same key has already been added
.
private class ProductUpdate
{
public int Index = 0;
public string ProductCode;
}
private void UpdateProduct( List<string> account, string userEmail, List<Product> products )
{
Dictionary<string, ProductUpdate> productUpdateDictionary = new Dictionary<string, ProductUpdate>();
for ( int i = 0; i < products.Count; i++ )
{
productUpdateDictionary.Add( products[i].code, new ProductUpdate { Index = i, ProductCode = products[i].code } );
}
}
I don't know how to solve this issue ,any body has any suggestion
Thanks a Lot!
Reply
Answers (
2
)
select all text in text box
how to convert string value into decimal in vb c#?