1
我有一个用C#编写的函数,它有一个参数类型Dictionary<string , string>
。当我尝试在VB.Net中调用此函数时,它不显示类型为Dictionary<string , string>
它显示为string
。下面是我的函数将函数参数调用为泛型字典从C#到vb.net中的问题
public bool RegisterCustomerAttribute(int CustomerId
, Dictionary<string , string> dictAttribute)
{
try
{
List<string> keys = new List<string>(dictAttribute.Keys);
foreach (string key in keys)
{
CustomerAttribute custattr = new CustomerAttribute();
custattr.Customer.CustomerID = CustomerId;
custattr.Key = key;
custattr.Value = dictAttribute[key];
customerattrepo.AddCustomerAttribute(custattr);
}
return true;
}
catch (Exception ex)
{
string strMsg = ex.Message;
return false;
}
}
alt text http://i46.tinypic.com/qsv6fa.png
您是否在旧签名到新签名的某个时刻更改了'RegisterCustomerAttribute'方法?您必须重建C#项目才能显示在您的VB.NET代码中。 – 2010-03-06 16:06:08
你是200%的权利。我身边的小错误.. – 2010-03-06 17:30:29