我怎样才能解决争论的类型 [英] How Can I Solve Types Of Arguments
问题描述
使用System.Collections.Generic.Dictionary;
using System.Collections.Generic.Dictionary;
错误19使用泛型类型'System.Collections.Generic.Dictionary< tkey,tvalue>'需要2个类型参数D:\ Factory \factory code \ BMI \\ \\Adcheck\Adcheck\Controls\Contents\ProductLevelCaptureData.xaml.cs 15 34 Adcheck
Error 19 Using the generic type 'System.Collections.Generic.Dictionary<tkey,tvalue>' requires 2 type arguments D:\Factory\factory code\BMI\Adcheck\Adcheck\Controls\Contents\ProductLevelCaptureData.xaml.cs 15 34 Adcheck
推荐答案
错误信息非常自我解释:词典需要两种类型。例如:
The error message is pretty self explanitory: Dictionary needs two types. For example:
Dictionary<string, int> myDict = ...
Dictionary<string, string> myDict = ...
Dictionary<int, int> myDict = ...
如果你只是写作:
If you are only writing:
Dictionary myDict = ...
或
Or
Dictionary<string> myDict = ...
然后它无法正常工作。
如果没有代码,我们就不能更具体了。
错误位置的代码块[/ edit]
Then it isn't going to work.
Without the code, we can't be more specific.
[edit]code block in wrong place[/edit]
您好您的问题不明确,但是我已经为您提供了C#中的Dictionary命名空间的示例
http ://msdn.microsoft.com/en-
us / library / xfhwa508(v = vs.90).aspx [ ^ ]
Hi Your question was not clear, however i have provide you the example for Dictionary namespace in the C#
http://msdn.microsoft.com/en-
us/library/xfhwa508(v=vs.90).aspx[^]
这篇关于我怎样才能解决争论的类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!