PC Review


Reply
 
 
=?Utf-8?B?TGFtaXM=?=
Guest
Posts: n/a
 
      20th Dec 2005
Hi,

Dim x As String = blabla[0]
Dim i As byte
I need to read that 0 to my byte i
how can I convert from string to byte???
thanks for your help
--
LZ
 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      20th Dec 2005
"Lamis" <(E-Mail Removed)> schrieb:
> Dim x As String = blabla[0]


?!?

That's not valid VB code.

> Dim i As byte
> I need to read that 0 to my byte i
> how can I convert from string to byte???


'System.Text.Encoding.<encoding>.GetBytes'. In addition check out 'Asc',
'AscW', and 'Convert.To*'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

 
Reply With Quote
 
 
 
 
Cor Ligthert [MVP]
Guest
Posts: n/a
 
      20th Dec 2005
Lamis,

Visual Basic has a very strong methods for that.
What you not ask is
x=Chrw(Cint(i))
What you asks
i(0)=CByte(ASCW(x))

http://msdn.microsoft.com/library/de...l/vafctchr.asp

http://msdn.microsoft.com/library/de...l/vafctasc.asp

http://msdn2.microsoft.com/en-us/library/s2dy91zy.aspx

I hope this helps,

Cor


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting a date to a text field w/o converting it to a julian da LynnMinn Microsoft Excel Worksheet Functions 2 6th Mar 2008 04:43 PM
Converting Time to decimals and then converting decimals to time neil_val@tiscali.co.uk Microsoft Excel Worksheet Functions 1 30th Nov 2007 05:09 PM
Converting Video Files CIFC General 6 6th Sep 2004 09:53 PM
converting drive to ntfs PAUL Windows XP Help 5 8th Nov 2003 01:26 PM
converting chinese XP to english? ax Windows XP Help 1 18th Oct 2003 08:23 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:39 PM.