VB.Net/XML LINQ/Aggregate — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
Admin (обсуждение | вклад) м (1 версия) |
(нет различий)
|
Текущая версия на 15:45, 26 мая 2010
Get the maximum value for the ID attribute
<source lang="vbnet"> Imports System Imports System.Xml.Linq
Public Class MainClass Public Shared Sub Main() Dim employees As XElement = XElement.Load("Employees.xml") Dim maxId As Integer = Aggregate ele In employees.<Employee> Into Max(CInt(ele.@id)) End Sub End Class </source>