Click here to Skip to main content
15,922,650 members
Home / Discussions / C#
   

C#

 
GeneralRe: SendKey Method Pin
M Riaz Bashir6-Dec-09 23:55
M Riaz Bashir6-Dec-09 23:55 
QuestionOnGotFocus Pin
Tagamoga6-Dec-09 22:56
Tagamoga6-Dec-09 22:56 
AnswerRe: OnGotFocus Pin
Shameel6-Dec-09 23:08
professionalShameel6-Dec-09 23:08 
GeneralRe: OnGotFocus Pin
Tagamoga6-Dec-09 23:17
Tagamoga6-Dec-09 23:17 
GeneralRe: OnGotFocus Pin
Shameel7-Dec-09 6:53
professionalShameel7-Dec-09 6:53 
Questiondatabase connection problem Pin
Erdinc276-Dec-09 21:48
Erdinc276-Dec-09 21:48 
AnswerRe: database connection problem Pin
lalit146-Dec-09 22:21
lalit146-Dec-09 22:21 
GeneralRe: database connection problem Pin
Erdinc276-Dec-09 22:42
Erdinc276-Dec-09 22:42 
AnswerRe: database connection problem Pin
puri keemti6-Dec-09 22:27
puri keemti6-Dec-09 22:27 
GeneralRe: database connection problem Pin
MNantu6-Dec-09 22:43
MNantu6-Dec-09 22:43 
AnswerRe: database connection problem Pin
MNantu6-Dec-09 22:36
MNantu6-Dec-09 22:36 
GeneralRe: database connection problem Pin
Erdinc276-Dec-09 23:15
Erdinc276-Dec-09 23:15 
GeneralRe: database connection problem Pin
MNantu6-Dec-09 23:20
MNantu6-Dec-09 23:20 
GeneralRe: database connection problem Pin
Erdinc276-Dec-09 23:43
Erdinc276-Dec-09 23:43 
GeneralRe: database connection problem Pin
lalit147-Dec-09 0:01
lalit147-Dec-09 0:01 
GeneralRe: database connection problem Pin
lalit147-Dec-09 0:10
lalit147-Dec-09 0:10 
GeneralRe: database connection problem Pin
Erdinc277-Dec-09 0:14
Erdinc277-Dec-09 0:14 
GeneralRe: database connection problem Pin
MNantu7-Dec-09 0:40
MNantu7-Dec-09 0:40 
GeneralRe: database connection problem Pin
Erdinc277-Dec-09 1:19
Erdinc277-Dec-09 1:19 
QuestionConverting BitArray to string Pin
Joe Rozario6-Dec-09 21:37
Joe Rozario6-Dec-09 21:37 
AnswerRe: Converting BitArray to string Pin
dan!sh 6-Dec-09 21:45
professional dan!sh 6-Dec-09 21:45 
GeneralRe: Converting BitArray to string Pin
Joe Rozario6-Dec-09 21:55
Joe Rozario6-Dec-09 21:55 
AnswerRe: Converting BitArray to string Pin
shiplu_20506-Dec-09 22:27
shiplu_20506-Dec-09 22:27 
GeneralRe: Converting BitArray to string Pin
Joe Rozario6-Dec-09 22:32
Joe Rozario6-Dec-09 22:32 
AnswerRe: Converting BitArray to string Pin
OriginalGriff6-Dec-09 23:17
mveOriginalGriff6-Dec-09 23:17 
If I read your messages correctly, you want to take in a string of 16 '0' or '1' characters, and convert them to two bytes, then convert the two bytes back to s string?
If so, then the first thing you need to look at is the "<<" operator. This shifts bits a number of places to the left within a byte, int or whatever.
So you would:

For each character in string, convert it to a byte (0 or 1) depending on whether it was '0' or '1'.
Shift that bit into a byte until the byte is full. Save the byte, and move on for the next.

Re-assembling the string from your bytes is the reverse of this, and is probably best done with a method to convert a byte to an 8 character string, used twice.

Honestly, it is quicker to write the code, than to describe it!

No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.

This message is made of fully recyclable Zeros and Ones

"Rumour has it that if you play Microsoft CDs backwards you will hear Satanic messages.Worse still, is that if you play them forwards they will install Windows"

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.