I have been trying to return an ArrayList from a WebService and I am confused about how to get it going as I get an error message saying
"Cannot implicitly convert type 'object[]' to 'System.Collections.ArrayList'".
Here is the Code for the Web Service names DDRParserService.asmx .
public ArrayList PVTLog(string reqNo, string groupNo, string filePath)
{
ArrayList logData = new ArrayList();
//Calling the Parsing Logic file
logData = ParsePVTLog_Service(reqNo, groupNo, filePath);
// I get the ArrayList in logData and return it
return logData
}
The Code where I consume the Web Service:
private void btnParse_Click(object sender, EventArgs e)
{
string strFilePath = txtOpenFile.Text;
string serialNo = txtSerialNumber.Text;
string groupNo = txtGroupNumber.Text;
ArrayList data = new ArrayList();
if (txtOpenFile.Text != "")
{
DDRParsingService.DDRParserService client = new DDRParsingService.DDRParserService();
// Call the Web Service
data = client.PVTLog(serialNo, groupNo, strFilePath);
// I get the error : Cannot implicitly convert type 'object[]' to 'System.Collections.ArrayList'
}
}
It would be great if you can help me handle this issue and access the data in the ArrayList returned by the Web Service.
Thanks in Advance!



List<T>over anArrayList....