October 6, 2015

Convert Delimited Text File to DataTable

The following code converts a delimited text file to a DataTable: Private Function CreateDataTable(ByVal path As String, ByVal headers As Boolean, ByVal delimiter As Char) As DataTable Dim dt As DataTable = New DataTable() If Not IO.File.Exists(path) Then Return Nothing End If Dim lines As List(Of String) = IO.File.ReadAllLines(path).ToList() If

Get Letter Count

The following code returns the amount of times that a char appears in a stringPrivate Function GetLetterCount(ByVal input As String, ByVal letter As Char) As Integer Return input.ToCharArray().Count(Function(c) c = letter)End Function

Objective-C Popularity Declines

The big news in this month’s update to the Tiobe index of programming language popularity is that Objective-C fell out of the top ten for the first time in five years and is now 14th on the list. The company believes this points to some larger trends within the mobile