Hi DJX,
I agree with Peter that for different custom collection class, though it
may provide multiple indexer accessors, their implementation are not
guaranteed to be related or 1:1 mapping. And for the items in SPListItem,
the int32 and string indexer are not simply 1:1 mapped. Actually, both of
them are always located through a SPField value in its internal
implementation.
I have had a look into the code of SPListItem class via reflector.
Unfortunately, the code is obfuscated, but we can still get some code logic
from it. If you have interests, you can also have look, the following three
classes are the ones involved in the Item[...] indexer:
SPFieldCollection
SPListItem
SPListItemCollection
<<<<<<<<
Also, there is the general code logic of the two Item[] indexers of
SPListItem
=====SPListItem+Item[string]====
**call a method to find the SpField through the string(from a internal
private SPField Array)
**and locate the Item(object) through the SPField(a method accept a SPField
and interger value as parameters)
=====SPListItem+Item[int32]======
Item[int32]
**call a method which search the internal SpListItemCollectiop(private
member) and locate the certain SPField by the in32 parameter
**locate the item(object) through the SPField(the same method as in
Item[string] approach)
======================================
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.