Converting ToArray : ToArray « LINQ « VB.Net






Converting ToArray

  

Imports System.IO
Imports System.Reflection
Imports System.Linq
Imports System.Xml.Linq

Public Class MainClass
   Public Shared Sub Main

        Dim doubles() As Double = {1.7, 2.3, 1.9, 4.1, 2.9}

        Dim sortedDoubles = From dbl In doubles _
                            Order By dbl Descending

        Dim doublesArray = sortedDoubles.ToArray()

        For d As Integer = 0 To doublesArray.Length
            Console.WriteLine(doublesArray(d))
        Next
   End Sub


End Class

   
    
  








Related examples in the same category