Tuesday, 15 January 2013

c# - A list of, list of ObservableCollection comes up null when looping through it -


I have a collection of compilations that are setup like the following.

  ObservableCollection & lt; ObservableCollection & lt; Image & gt; & Gt; _Documents_Completeclaims = New observable collection & lieutenant; OverviewCollection & lt; Image & gt; & Gt; ();   

And I'm adding an archive to this list:

  this._Documents_CompleteClaimsAdd (this._Documents_NewClaimList);   

When I try to loop through the archive, it appears blank. There is one item in the collection:

But the collection number shows 0.

I used it just a few times ago, But with the list instead of ObservableCollection. Have worked well before any idea why the collections collections are not working? Or am I looking somewhat silly?

The problem is that I have incorrectly diagnosed this issue that there is no item in the collection in the collection.

In this way I was adding the collection to the list of collections:

  this._Documents_CompleteClaimsAdd (this._Documents_NewClaimList); // Add claims to complete this list. Document_new climilar clean (); // Clear the list of claims so that we can start a new claim   

I confirmed that there were items in the document_ new climist list collection, I can add that collection to the archive and then clear the Document_NewClaimlist collection. But if I comment it out Clear () line, it works just fine So I think the item must be removed in a different way. Maybe I can add items to a temporary collection, add that archive to the archive collection, and then clear the old archive.

There is something particularly wrong with what you posted. If you encounter the encounter not , it was a false diagnosis. You've got a collection of archives, it contains an item which is empty which is empty I do not doubt that this is a bug, but this is not a bug in the code you posted.

Focusing on the code to add the best of that object to that empty collection.

No comments:

Post a Comment