simple casting question

  • Thread starter Thread starter DBC User
  • Start date Start date
Then you actually want to store it in a byte.

Well I missed out the conversation here. It looks like I can not store
the non printable value of 1 (not the character 1) in a character
field?

I can store the value 1 as binay 1 in byte field. Now is it possible to
move the value as it is to a character field??

Thanks.
 
Well I missed out the conversation here. It looks like I can not store
the non printable value of 1 (not the character 1) in a character
field?

Of course you can.

// character with value 1
char c = (char)1;

// string containing a single character with value 1
string s = ((char)1).ToString();

-cd
 
DBC said:
Well I missed out the conversation here. It looks like I can not store
the non printable value of 1 (not the character 1) in a character
field?

I can store the value 1 as binay 1 in byte field. Now is it possible to
move the value as it is to a character field??

Yes it is possible. Several posters have illustrated how to do it.

Evidently, there is something wrong with your program. Unless you post
the code in question, we can't help you fix it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top