How can I resolve “Item has already been added. Key in dictionary:” errors?

前端 未结 2 1437
花落未央
花落未央 2021-01-22 18:40

I have an application which got hung up when I tried to add items to it. When I checked the trace file I got this entry:

   for (int i=0; i

        
2条回答
  •  伪装坚强ぢ
    2021-01-22 19:17

    The exception indicates that you adding same key twice to your dictionary, to solve this issue you can start by insuring that the DataModelCollection objects which passed to the function has unique Key values (which in your case is a Guid data type) dmo.Guid

提交回复
热议问题