我有一个webservice方法如下:
[WebMethod]
public Playlist GetPlayList(string user, string password)
{
}
返回的类型定义如下:
Code
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.1432")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = false)]
[System.Xml.Serialization.XmlRootAttribute(Namespace = "", IsNullable = false)]
[System.Xml.Serialization.SoapInclude(typeof(Playlist))]
[XmlInclude(typeof(Playlist))]
public partial class Playlist
{
private List<PlaylistChannel> itemsField = new List<PlaylistChannel>();
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute("Channel", Form = System.Xml.Schema.XmlSchemaForm.Unqualified)]
public List<PlaylistChannel> Channels
{
get
{
return this.itemsField;
}
set
{
this.itemsField = value;
}
}
}
现在引用的时候,返回的类型是PlaylistChannel[],怎么样定义,才可以返回的类型是Playlist