Code Repo    |     RSS
MD's Technical Sharing



Friday, April 3, 2009

.NET Useful Cast & Conversions

Memory Stream to String

Dim str As String = New StreamReader(stream).ReadToEnd


Byte Array to String and vice versa

Dim SMSCData(0 To 50) As Byte
Dim smsc as String = Encoding.ASCII.GetString(SMSCData, 0, SMSCData.Length)
Dim password As String
Dim passwArray As Byte() = Encoding.ASCII.GetBytes(password)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.