Browse by Tags

All Tags » VB Quarks » VB10 (RSS)
Hopefully you already know VB has full support for Optional parameters, both declaring them and calling them, but did you know you can use Dates as Optional parameters ?    Public   Sub AddNewCustomer(customer As   Customer , ...
The DateTime structure in .NET includes custom operators for Date comparisons such as less than, greater than, equal and not equal; but did you know it also includes addition and subtraction operators ?  There’s two subtraction operators and one...
Can you pick the problem with this code ? :       Dim currentChar As   Char       For i = 0 To largenumber          currentChar = getChar(i)         ...
Do you know why you can’t write this code in VB:    Dim x = 123456789.0123456789 Answer: The IDE won’t let you If you try to write that code the IDE will truncate the number, giving :    Dim x = 123456789.01234567 To include all the...
Can you spot the problem with this code:    < Extension ()>    Public   Function ToColor(argb As   UInteger ) As   Color       Return   Color .FromArgb( _                      ...
Building upon VB Quark #1 , did you know you can use compiler directives alongside expressions in constants ? #If CONFIG = "Debug"   Then    Const path As String = "Z:\mydebug.sdf" #Else    Const path As  ...
This quark is more of a did ya know quark about constant expressions in VB. You probably know you can declare a constant expression such :    Const appName As   String = "My Really Cool App" But did you know you can also do operations...
This VB Quark is the one that started the conversation some weeks back. It’s number 0, both because these days things are typically 0 based in .NET, and also you could say it is ground zero. It’s about a quirk quark to do with lambda functions versus...
A few weeks ago I was having a discussion about a particular language feature that was causing a couple of people to trip up in their code. From that discussion we identified some places where the VB compiler and IDE can possibly help in the future; but...
with no comments
Filed under: , , , ,