myAFElement.HasChildren = true when myAFElement.Elements.Count = 0

Discussion created by GreenTech on Sep 23, 2011
Latest reply on Sep 26, 2011 by RJKSolutions
If my understanding of the SDK is correct, this shouldn't happen. ................. Field Value Returns trueTruetruetrue (True in Visual Basic) if the element has child elements. Remarks This method provides a more performant way of checking for child elements of this element other than using the Elements collection. ................. We are using the .HasChildren property but I noticed the attached strange behaviour when stepping throught the code looking for an issue. So which is the more 'performant' answer? ;) Anyone else seen this happen? (not 100 percent repeatable btw but I have seen it several times) Thanks. (AFSDK, Winsvr2007sp1/64 (client & server), VS2008, .Net 3.5SP1)