I am starting with a project in ASP.Net and I have a function to perform a login which has userId and password as parameters, but I need to make an array of these parameters, since this will allow me to use different ones userId with their respective password, function that i am using is as follows:
public string Login(string sessionTicket, string dataSource, string userId, string password, int features) {
object[] results = this.Invoke("Login", new object[] {
sessionTicket,
dataSource,
userId,
password,
features});
return ((string)(results[0]));
}
In addition to the above, I will use this function in the following method, which I will also have to convert the parameters xtUser and xtPass an array:
string sessionTicket = axServicesInterface.Login("",
GlobalVariables.dataSource,GlobalVariables.xtUser, GlobalVariables.xtPass,
Convert.ToInt32(EAxType.AxFeature_Basic));
Attached image of the parameters that the login function has:
The login array is required to be able to alternate the two users that I have each requests
UPDATE:
Try the answer thing but I have an error saying "userID does not exist in context"
public class LoginDetails
{
public string userId { get; set; }
public string password { get; set }
}
public string Login(string sessionTicket, string dataSource, LoginDetails[] loginDetails, int features) {
object[] results = this.Invoke("Login", new object[] {
sessionTicket,
dataSource,
userId,
password,
features});
return ((string)(results[0]));
}
They know if what I am doing is correct for what I need, this is how I can solve the current error.


userIdandpassword. Iterate the new array that you have calling Invoke for each item in your array.foreachoverloginDetails.