1
하나의 매개 변수 유형이 Dictionary<string , string>
인 C#으로 작성된 함수가 있습니다. 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' 메소드를 이전 서명에서 새 서명으로 변경 했습니까? VB.NET 코드에 표시되도록 C# 프로젝트를 다시 빌드해야합니다. –
당신은 200 % 권리가 있습니다. 내 편에서의 작은 실수 .. –