My programming policy prohibits the use of the Microsoft.VisualBasic namespace, this is to ensure good programming practice and future-proofing. There has been only 1 annoying problem with this...
I was fed up with the non-existant way to give a Char variable an initial value.
This is my remedy.
It is a small class that wraps a private byte buffer that allows rapid callup of char values based on their ascii code.
I'll let the code speak for itself, it is commented with VBCommenter
If you only have to initialise one or two chars then you might as well do it manually, but for many char assignments (ie in a loop) then this is the most efficient approach (more or less).
So if you too find yourself without the VisualBasic namespace, this is my gift to you
EDIT: UPDATED VERSION WITH AN ASC() FUNCTION![]()





).
Reply With Quote