On Fri, 13 Jul 2007 06:52:01 -0700, Ricardo Quintanilla
<Ri****************@discussions.microsoft.comwrote :
i need to convert data from string to nibble wich (nibble is a four bits
representation)
As example i have the following code
string data1 = "12345678";
so ¿how can i convert this data (numbers) to a nibble representation?
Your question is too vague to be answered.
First, the question is when you write "this data (numbers)", what exactly
is the data you want to convert _from_? Do the numbers represent an
actual integer value that you then want to extract the nibbles from? Do
you want the nibbles straight from the Unicode string that represents the
numbers? Do you want some other kind of string instead (e.g. ASCII)?
While you are thinking about those questions, you might review things like
the System.Text.Encoding class and its descendants, the Parse() method for
various numeric types, and the BitConverter class. Some or all of those
might be useful in solving your problem, depending on what your actual
goal is.
Pete