![](/img/trans.png)
[英]C# / vb.NET Bound DataGridView: Add Event Handler to DataGridViewComboboxCell
[英]Datagridview bound to Dictionary in vb.net
我发现了这一点: DataGridView绑定到Dictionary
将Datagridview绑定到Dictionary的一种解决方案是以下C#代码:
var _priceDataArray = from row in _priceData select new { Item = row.Key, Price = row.Value };
现在,我使用C#到vb.net转换器在vb.net中尝试了此操作。 转换器为我提供以下内容:
Dim _priceDataArray = From row In _priceDataNew With { _
Key .Item = row.Key, _
Key .Price = row.Value}
但是,这不起作用。 with语句上的错误消息:“预期语句结束”
有什么想法吗?
转换应为:
Dim _priceDataArray =
From row In _priceDataNew
Select New With {
Key .Item = row.Key,
Key .Price = row.Value
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.