Click here to Skip to main content
15,892,005 members
Home / Discussions / C#
   

C#

 
QuestionThe network Problem is Solved but..... Pin
snouto26-Jan-06 4:08
snouto26-Jan-06 4:08 
AnswerRe: The network Problem is Solved but..... Pin
J4amieC26-Jan-06 5:46
J4amieC26-Jan-06 5:46 
AnswerRe: The network Problem is Solved but..... Pin
leppie26-Jan-06 6:36
leppie26-Jan-06 6:36 
QuestionBinary converting byte to sbyte Pin
Marco [Stinger]26-Jan-06 3:45
Marco [Stinger]26-Jan-06 3:45 
AnswerRe: Binary converting byte to sbyte Pin
Guffa26-Jan-06 7:45
Guffa26-Jan-06 7:45 
GeneralRe: Binary converting byte to sbyte Pin
Marco [Stinger]26-Jan-06 11:13
Marco [Stinger]26-Jan-06 11:13 
GeneralRe: Binary converting byte to sbyte Pin
leppie26-Jan-06 11:39
leppie26-Jan-06 11:39 
AnswerRe: Binary converting byte to sbyte Pin
Guffa27-Jan-06 7:58
Guffa27-Jan-06 7:58 
Just a typo. Of course a byte can't be -42.

It was unchecked (as leppie suggested) that I was going for, not unsafe.

However, some testing reveals that you can just cast the value from byte to sbyte. You don't need unchecked mode for casting between signed and unsigned data types.

byte source = 214;<br />
sbyte dest;<br />
dest = (sbyte)source;


Now dest will contain the value -42.

Marco [Stinger] wrote:
Second a simple cast doesn't convert BINARY the values


What do you mean by convert BINARY, then?

---
b { font-weight: normal; }

GeneralRe: Binary converting byte to sbyte Pin
Marco [Stinger]27-Jan-06 22:21
Marco [Stinger]27-Jan-06 22:21 
GeneralRe: Binary converting byte to sbyte Pin
Saravanan_article26-Jan-06 19:00
Saravanan_article26-Jan-06 19:00 
QuestionThreadPool and Application Exit Pin
MrEyes26-Jan-06 3:39
MrEyes26-Jan-06 3:39 
AnswerRe: ThreadPool and Application Exit Pin
leppie26-Jan-06 6:39
leppie26-Jan-06 6:39 
Questionwhere is the windows namespace? Pin
GDavy26-Jan-06 2:41
GDavy26-Jan-06 2:41 
AnswerRe: where is the windows namespace? Pin
J4amieC26-Jan-06 3:11
J4amieC26-Jan-06 3:11 
GeneralRe: where is the windows namespace? Pin
GDavy26-Jan-06 3:39
GDavy26-Jan-06 3:39 
QuestionC# TcpListener connection problem Pin
Johan Glysing26-Jan-06 1:41
Johan Glysing26-Jan-06 1:41 
AnswerRe: C# TcpListener connection problem Pin
snouto26-Jan-06 4:19
snouto26-Jan-06 4:19 
GeneralRe: C# TcpListener connection problem Pin
Johan Glysing26-Jan-06 20:35
Johan Glysing26-Jan-06 20:35 
GeneralRe: C# TcpListener connection problem Pin
snouto26-Jan-06 23:28
snouto26-Jan-06 23:28 
QuestiongetFunctionPointer() Pin
winx26-Jan-06 1:36
winx26-Jan-06 1:36 
AnswerRe: getFunctionPointer() Pin
winx26-Jan-06 1:41
winx26-Jan-06 1:41 
GeneralRe: getFunctionPointer() Pin
James Gupta26-Jan-06 5:16
professionalJames Gupta26-Jan-06 5:16 
GeneralRe: getFunctionPointer() Pin
Saravanan_article26-Jan-06 19:07
Saravanan_article26-Jan-06 19:07 
GeneralRe: getFunctionPointer() Pin
winx26-Jan-06 20:42
winx26-Jan-06 20:42 
QuestionCheck Signing Key Pin
gnjunge26-Jan-06 1:16
gnjunge26-Jan-06 1:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.