- Where Developers Learn, Share, & Build Careers


I have some old J code that I'm going to C #

  XmlNodeList ItemTransferOutNodes = strxML .GetElementsByTagName ("ItemTransferOut"); XmlElement itemInfo = itemTransferOutNodes.Item (itemTrOutNodesCnt) .ChildNodes.Item (0) .get_Item ("itemInfo"); I do not see the   

API c # API XmlNodeList method called get_Item . get_item in c # .

Thank you.

There is no support for properties like H #, so they use methods instead Are "fake". You can find more information on If some of the property names are named in the C # object:

  public class dummy {public string SomeProperty {get; Set; }}   

In J #, you will need to call get_SomeProperty () and set_SomeProperty (string value):

  public class dummy {private string something credited; / ** @ Property * / Public unwanted setprop property (string value) {someProperty = val; } / ** @ Property * / Public string get_SomeProperty () {someProperty return; }}   

And the other side is true.

If you find a # in the class, get_xxx or set_xxx class method, it is most likely that in C #, the object is the property named Xxx.

So basically, as mentioned by other people, you have to use the item property in your code:

  XmlNodeList itemTransferOutNodes = strxML.GetElementsByTagName (" ItemTransferOut "); XmlElement itemInfo = itemTransferOutNodes.Item (itemTrOutNodesCnt) .ChildNodes.Item (0) .im ["itemInfo"];   

Hope that helps :)

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -