c# - Join Dictionary<int, string> and List<MyClass> error (type arguments for method cannot be inferred from the usage) -
i´m trying join dictionary<int, string>
, list<myclass>
throws error
"type arguments method cannot inferred usage".
but seems me arguments defined...
class row { public string name { get; set; } public string[] data { get; set; } } dictionary<int, string> devices = new dictionary<int,string>(); list<row> rows = new list<row>(); rows = rows.join(devices, row => row.data[0], device => device.key, (row, device) => { row.data[1] = device.value; return row; }).tolist();
row
row
, device
pair<int,string>
, device.key
int
, , device.value
k. problem? know must silly thing, i´m stuck error.
row.data[0]
string, device.key
integer, key types don't match.
Comments
Post a Comment