Monday, April 24, 2006

Thanks dave, this is a great piece of code however more blog entries showed there was a flaw (at least for my milage). Saved me some time though. Why microsoft doesnt have this natively in the .net framework is also beyond me. The sample below is my slightly modified version which does do the conversion correctly.

Imports System.Text  Public Shared Function ConvertStringToByteArray(ByVal stringToConvert As String) As Byte()     Return System.Text.Encoding.ASCII.GetBytes(stringToConvert.ToCharArray()) End Function


Convert String to Byte Array
Comments: Post a Comment

Links to this post:

Create a Link

<< Home


Recent Posts


Sql Server Row Size Limit - Rick Strahl's WebLog
Visual Studio Express
VB.NET: Base 36 Function
BLOGGER: You can use GeSHi in your blogger posts
LINUX: wget
FOXPRO: Defeat the error handler
ALL: MSXML Memory Leaks
FOXPRO: Connection Pooling Sucks
VB.NET: SMTP Mail
VB.NET: Strong Naming


Archives

01/01/2005 - 02/01/2005
02/01/2006 - 03/01/2006
03/01/2006 - 04/01/2006
04/01/2006 - 05/01/2006
05/01/2006 - 06/01/2006
09/01/2006 - 10/01/2006
10/01/2006 - 11/01/2006
11/01/2006 - 12/01/2006
12/01/2006 - 01/01/2007
04/01/2007 - 05/01/2007
05/01/2007 - 06/01/2007
01/01/2008 - 02/01/2008
02/01/2008 - 03/01/2008
05/01/2008 - 06/01/2008
06/01/2008 - 07/01/2008
08/01/2008 - 09/01/2008
09/01/2008 - 10/01/2008
11/01/2008 - 12/01/2008
12/01/2008 - 01/01/2009
01/01/2009 - 02/01/2009
02/01/2009 - 03/01/2009
04/01/2009 - 05/01/2009
05/01/2009 - 06/01/2009
07/01/2009 - 08/01/2009
01/01/2010 - 02/01/2010

My Software

Blinky - GBPVR Plugin
PhotoCopy - GBPVR Plugin
QTC - Quick Test Case
rBoop - Rob's Timers

Programming Links

C# Formatter
NSIS

Other Links

Damn Small Linux

Sites I Manage

Do it yourself SEO. Cheap.
Pet Supplies
Dog toy of the month club
SqueakerZ pet Deals
Geocaching Community
Hitch hiker Tracking