'Rextester.Program.Main is the entry point for your code. Don't change it.
'Compiler version 11.0.50709.17929 for Microsoft (R) .NET Framework 4.5
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text.RegularExpressions
Imports System.Data
Namespace Rextester
Public Module Program
Public Sub Main(args() As string)
Dim tabla As New DataTable()
tabla.Columns.AddRange(New DataColumn(1) {New DataColumn("Animales", GetType(String)),
New DataColumn("cantidad", GetType(Integer))})
tabla.Rows.Add("Perros", 5)
tabla.Rows.Add("Gatos", 3)
tabla.Rows.Add("Loros", 2)
Dim total = tabla.AsEnumerable().Sum(Function(t) t.Field(Of Integer)("cantidad"))
Console.WriteLine(total)
End Sub
End Module
End Namespace
10