I'm attempting to implement a client-side application in C# (Using the mono framework) and the Salesforce Partner SOAP API.
I can successfully login, however am slightly confused on how to actually retrieve field values from a query() call.
In Java, I was able to do this (for example):
for( SOBject record : queryResult.getRecords() ){
String name = (String)record.getField("Name");
}
Whereas the dotNET library does not appear to have any analogue to the 'getField' call.
The official documentation refers to using the record.Any array to retrieve field values by index. i.e.
foreach( var record in queryResult.Records ){
string name = record.Any[0].InnerText;
}
however this is not optimal - with a large number of fields I really need to be able to fetch fields by the real field name.
Am I missing something here? Or can I only access field values via a 0-indexed array in the dotNET implementation of the Soap API?