I want to pass array of string to my controller. I pass my data from another c# code.
Here my get request :
String[] varList = new List<String> { "A", "B" }.ToArray();
using (var client = new HttpClient())
{
await client.GetAsync(GetHttpSchema() + HttpContext.Current.Request.Url.Host + "/AController/B?varA=" + varA + "&varB=" + varB + "&varList=" + varList);
}
And here my controller:
public partial class AController : BaseController
{
public async Task B(string A, string B, String[] varList) { }
}
Now in debug i get the following value(Only one value) for varList : System.String[]..... Any suggestions?