怎样在接口类里定义集合,请路过的朋友帮忙,多谢!!!
代码如下:请各位帮忙???
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SerializerTeset.CommonClass
{
public interface ISerializerObject
{
string UserName
{
set;
get;
}
string UserId
{
set;
get;
}
List<string> LUserName = new List<string>();//想定义这样一个list,系统提示接口里不能有字段,请问高手怎样在接口类里面定义集合???? bool Save(string fileName);
bool Load(string fileName);
}
} list interface
[解决办法]
public List<string> LUserName { get; set; }