这是方法:
getUsersList(ref List<RealBioSDKUser> userList,
int groupId = -1,
[DateTimeConstant(0), Optional] DateTime fromDate)
当我像这样传递参数时:
List<RealBioSDKUser> tempUserList=new List<RealBioSDKUser>();
BioClient.getUsersList(ref tempUserList,0, "1900-01-01");
显示此错误:
the best overloaded method match for collections.generic.list like this.
最佳答案
因为 "1900-01-01"
是一个字符串,而不是 DateTime
。而是传递一个 DateTime
对象:
BioClient.getUsersList(ref tempUserList,0, new DateTime(1900, 1, 1));
关于c# - 我怎样才能将参数传递给这个方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47676560/