我正在尝试调用一个 UserControl 公共(public)方法,该方法需要引用具有以下定义的 Dictionary 对象:
var dict = new Dictionary <Tuple<string, string>, Mappings.Level0>()
Argument 1: cannot convert from
System.Collections.Generic.Dictionary<ListBoxConnector.ucMappings.Tuple<string,string>,Mappings.Level0>
toSystem.Collections.Generic.Dictionary<System.Tuple<string,string>,Mappings.Level0>
最佳答案
尝试使用 ListBoxConnector.ucMappings
元组代替:
var dict = new Dictionary<ListBoxConnector.ucMappings.Tuple<string, string>,
Mappings.Level0>();
关于c# - 如何正确地将 Dictionary<Tuple<string,string>,Object> 作为参数传递给方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27736924/