I have some old J# code that I am moving to C#
XmlNodeList itemTransferOutNodes =
strXML.GetElementsByTagName("ItemTransferOut");
XmlElement itemInfo =
itemTransferOutNodes.Item(itemTrOutNodesCnt)
.ChildNodes.Item(0)
.get_Item("itemInfo");
I dont see in C# API of XmlNodeList method called get_Item.
To what I should change get_Item in c#.
Thanks .
J# does not have support for properties like C# does, so they are “faked” by using methods instead. You can find more information on that matter on MSDN. If a C# object has a property named SomeProperty:
in J#, you’ll have to call get_SomeProperty() and set_SomeProperty(string value):
And the other way around is true.
If you find in J# a class method called get_xxx or set_xxx, it’s most likely that in C#, the object has a property named xxx.
So basically, as others mentionned, you have to use the Item property in your code :
Hope that helps 🙂