Mul*_*ner 2 .net vb.net dictionary
在.net 4.0字典中我知道我可以像这样计算所有整数值字段的总和:
Dim dbar As Dictionary(Of String, Integer) = New Dictionary(Of String, Integer)() From {{"A", 1}, {"B", 1}, {"C", 1}}
Dim sum As Integer = 0
For Each v As Integer In dbar.Values
sum += v
Next
Run Code Online (Sandbox Code Playgroud)
是否存在更优雅的方式来计算总和?