title: VB.NET LINQ Query: Getting The Sum of All Values For A Specific Structure Member
body: <p>In VB.NET, let's assume I have the following Structure:</p>
  
  <pre><code>Public Structure Product
      Public ItemNo As Int32
      Public Description As String
      Public Cost As Decimal
  End Structure
  </code></pre>
  
  <p>... and a Generic List of the Products:</p>
  
  <pre><code>Dim ProductsList As New List(Of Product)
  
  Dim product1 As New Product
  
  With product1
      .ItemNo = 100
      .Description = "Standard Widget"
      .Cost = 10D
  End With
  
  ProductsList.Add(product1)
  
  Dim product2 As New Product
  
  With product2
      .ItemNo = 101
      .Description = "Standard Cog"
      .Cost = 10.95D
  End With
  
  ProductsList.Add(product2)
  
  Dim product3 As New Product
  
  With product3
      .ItemNo = 101
      .Description = "Industrial Strenght Sprocket"
      .Cost = 99.95D
  End With
  
  ProductsList.Add(product3)
  </code></pre>
  
  <p>How would I define a LINQ Query to Sum all of the Product.Cost values in the List?  In other words, what would be the LINQ 
  Query in VB.NET to return the value 120.90, which reflects the sum of all three Product Cost values in a single LINQ Query?</p>