Dim ofd As New OpenFileDialog If ofd.ShowDialog Then If IO.File.Exists(ofd.File.FullName) Then Dim srsCol As New List(Of String()) Using fs As IO.FileStream = ofd.File.OpenRead Using sr As New IO.StreamReader(fs) While Not sr.Peek = -1 srsCol.Add((sr.ReadLine.Split(","c).ToArray)) End While End Using End Using dgStaff.ItemsSource = srsCol End If End If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)