Click here to Skip to main content
15,891,136 members
Home / Discussions / C#
   

C#

 
QuestionCan I activate a remote object with specified culture? Pin
machocr16-Jan-06 14:53
machocr16-Jan-06 14:53 
QuestionSliding toolbar Pin
MAGrimsley16-Jan-06 14:33
MAGrimsley16-Jan-06 14:33 
AnswerRe: Sliding toolbar Pin
Suelinda_W31-Jan-06 9:19
Suelinda_W31-Jan-06 9:19 
QuestionString and Byte troubles Pin
Tom Wright16-Jan-06 10:39
Tom Wright16-Jan-06 10:39 
AnswerRe: String and Byte troubles Pin
Gerald Schwab16-Jan-06 11:09
Gerald Schwab16-Jan-06 11:09 
AnswerRe: String and Byte troubles Pin
Guffa16-Jan-06 11:17
Guffa16-Jan-06 11:17 
GeneralRe: String and Byte troubles Pin
Tom Wright16-Jan-06 11:26
Tom Wright16-Jan-06 11:26 
GeneralRe: String and Byte troubles Pin
Curtis Schlak.16-Jan-06 12:37
Curtis Schlak.16-Jan-06 12:37 
Tom,

I think I found your problem. You use the System.Text.Encoding.ASCII encoder which, by definition in the .NET platform, is a seven-bit text representation. From the documentation:
ASCII characters are limited to the lowest 128 Unicode characters, from U+0000 to U+007f.
To do what you want, try the following:
System.Text.Encoding en = System.Text.Encoding.Unicode;
byte[] HBReply = new byte[ 30 ];
byte[] buffer = null;
string s = "\xFF\x00\xAA\x55";
buffer = en.GetBytes( s );
for( int i = 0; i < buffer.Length; i += 2 )
{
  HBReply[ i / 2 ] = buffer[ i ];
}
return HBReply;
This encodes the string as Unicode, gets every other entry, and puts that into the HBReply array.

"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
AnswerRe: String and Byte troubles Pin
Guffa16-Jan-06 12:50
Guffa16-Jan-06 12:50 
Questionhow can i make image layer Pin
ugurbil16-Jan-06 9:50
ugurbil16-Jan-06 9:50 
AnswerRe: how can i make image layer Pin
Christian Graus16-Jan-06 11:53
protectorChristian Graus16-Jan-06 11:53 
GeneralRe: how can i make image layer Pin
ugurbil18-Jan-06 2:32
ugurbil18-Jan-06 2:32 
GeneralRe: how can i make image layer Pin
Christian Graus18-Jan-06 9:00
protectorChristian Graus18-Jan-06 9:00 
QuestionCustom Components - Where are they? Pin
redfish3416-Jan-06 7:44
redfish3416-Jan-06 7:44 
AnswerRe: Custom Components - Where are they? Pin
Guffa16-Jan-06 8:16
Guffa16-Jan-06 8:16 
GeneralI Got It! I think? Pin
redfish3416-Jan-06 9:19
redfish3416-Jan-06 9:19 
GeneralRe: I Got It! I think? Pin
J4amieC16-Jan-06 21:57
J4amieC16-Jan-06 21:57 
QuestionSend a double click? Pin
melanieab16-Jan-06 7:15
melanieab16-Jan-06 7:15 
AnswerRe: Send a double click? Pin
Judah Gabriel Himango16-Jan-06 8:32
sponsorJudah Gabriel Himango16-Jan-06 8:32 
QuestionJoinMulticastGroup from multiple processes on same machine Pin
John Fisher16-Jan-06 6:30
John Fisher16-Jan-06 6:30 
QuestionEncryption and Decryption Problems Pin
thepolishguy16-Jan-06 5:49
thepolishguy16-Jan-06 5:49 
AnswerRe: Encryption and Decryption Problems Pin
John Fisher16-Jan-06 6:23
John Fisher16-Jan-06 6:23 
GeneralRe: Encryption and Decryption Problems Pin
thepolishguy16-Jan-06 6:37
thepolishguy16-Jan-06 6:37 
GeneralRe: Encryption and Decryption Problems Pin
John Fisher16-Jan-06 6:50
John Fisher16-Jan-06 6:50 
GeneralRe: Encryption and Decryption Problems Pin
thepolishguy16-Jan-06 7:03
thepolishguy16-Jan-06 7:03 

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.