Saturday, April 10, 2010

VB's Missing Functions: Binary

Visual Basic is a great language, but it is missing some valuable functions, one of which is a Binary (Bin()) function. Below is some code I wrote to address this issue (special thinks to Bytewzrd for the idea).

VB.NET Code:
Function Bin(ByVal Number As Long) As String
Dim binval As String = ""
Dim nbr As Long = Number
While nbr > 0
binval = (nbr And 1) & binval
binval >>= 2
End While
Return binval
End Function



Cross Platform Coding With Mono

Mono is a cross platform development framework. With Mono, you can run your .NET applications on Linux, Mac, and Windows with minimum or no changes to your source code.

Check out Mono here: http://www.mono-project.com