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