【发布时间】:2013-04-21 21:51:17
【问题描述】:
下面是我的代码,它给出了一个错误: 无法将类型“System.Collections.Generic.List”隐式转换为“string[]”
我尝试了几次来解决这个错误。但我没有这样做。 如果有任何机构可以提出解决方案..谢谢:)
public GetContentResponse GetContent(abcServiceClient client, QueryPresentationElementIDsResponse querypresentationelementresponse)
{
GetContentRequest GetContentRequest = new GetContentRequest();
GetContentResponse contentresponse = new GetContentResponse();
querypresentationelementresponse = presentationElementId(client);
List<string[]> chunks = new List<string[]>();
for (int i = 0; i < querypresentationelementresponse.IDs.Length; i += 25)
{
chunks.Add(querypresentationelementresponse.IDs.Skip(i).Take(25).ToArray());
contentresponse = client.GetContent(new GetContentRequest()
{
IDs = chunks // here i get this error
});
}
return contentresponse;
}
【问题讨论】:
标签: c# asp.net web-services casting