編輯:解決了,這個遺憾,是由於一個錯字。名單
此代碼。
List<Tuple<Int16, Int16>> a = new List<Tuple<Int16, Int16>>();
Tuple<UInt16, UInt16> b = Tuple.Create<UInt16, UInt16>(4, 2);
a.Add(b);
主要生產用於a.Add(b)
The best overloaded method match for
'System.Collections.Generic.List<System.Tuple<short,short>>
.Add(System.Tuple<short,short>)'
has some invalid arguments.
以下錯誤總之
List<Tuple<short,short>>.Add(Tuple<short,short>)
has invalid arguments
我看不出這是。
的Int16 = UINT16 – dtb 2012-02-01 21:01:16
+1標題:d – Steven 2012-02-01 21:02:15
@dtb:這就是答案。要麼你回答這個問題,要麼我們關閉它,因爲它必須是重複的:-) – Steven 2012-02-01 21:03:30