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

C#

 
QuestionMemory leak on Lucene.net 2.3.2 Pin
susantasamanta853-Sep-09 5:20
susantasamanta853-Sep-09 5:20 
AnswerRe: Memory leak on Lucene.net 2.3.2 Pin
Henry Minute3-Sep-09 5:33
Henry Minute3-Sep-09 5:33 
Questionsend data to website Pin
Omar Gameel Salem3-Sep-09 5:16
professionalOmar Gameel Salem3-Sep-09 5:16 
AnswerRe: send data to website Pin
Eddy Vluggen3-Sep-09 7:12
professionalEddy Vluggen3-Sep-09 7:12 
GeneralRe: send data to website Pin
Omar Gameel Salem3-Sep-09 7:58
professionalOmar Gameel Salem3-Sep-09 7:58 
QuestionSystem.Diagnostics.Process, asyncronous reading StandardOutput and StandardError streams Pin
Jon Hulatt3-Sep-09 5:03
Jon Hulatt3-Sep-09 5:03 
AnswerRe: System.Diagnostics.Process, asyncronous reading StandardOutput and StandardError streams Pin
Heath Higgins9-Sep-09 13:10
Heath Higgins9-Sep-09 13:10 
QuestionByte to bit array problem Pin
gwithey3-Sep-09 4:58
gwithey3-Sep-09 4:58 
I am experienceing a problem breaking up three bytes of data into bit arrays and assigning a value to an enumeration as a result, code shown bellow:

if (UpdateLEDAndBeepStatus != null)
                  {
                     BitArray byte0 = new BitArray(commandData.Data[0]);
                     BitArray byte1 = new BitArray(commandData.Data[1]);
                     BitArray byte2 = new BitArray(commandData.Data[2]);

                     enumLEDAndBuzzer[] LEDAndBuzz_enumArray = new enumLEDAndBuzzer[15];

                     

                     // byte 0 bit 0
                     if (byte0[0] == true) //byte0.Count .Get(8-8)
                     {
                        LEDAndBuzz_enumArray[0] = enumLEDAndBuzzer.BUZZER_STATE_ON;
                     }
                     else
                     {
                        LEDAndBuzz_enumArray[0] = enumLEDAndBuzzer.BUZZER_STATE_OFF;
                     }
                     // byte 0 bit 1
                     if (byte0[1] == true) //byte0.Count
                     {
                        LEDAndBuzz_enumArray[1] = enumLEDAndBuzzer.LED1_MCUEnable_ON;
                     }
                     else
                     {
                        LEDAndBuzz_enumArray[1] = enumLEDAndBuzzer.LED1_MCUEnable_OFF;
                     }


When the project gets to this stage the values in the bytes are "255".
Should that not mean all 8 bits will be true?

However my code never enters the true section of my if statement claiming "byte0[0]" is false.

Either that or i am going about checking the bit values wrong, can anyone help?

Thanx George Smile | :)
AnswerRe: Byte to bit array problem Pin
Henry Minute3-Sep-09 5:24
Henry Minute3-Sep-09 5:24 
GeneralRe: Byte to bit array problem Pin
Luc Pattyn3-Sep-09 5:54
sitebuilderLuc Pattyn3-Sep-09 5:54 
GeneralRe: Byte to bit array problem Pin
Henry Minute3-Sep-09 6:03
Henry Minute3-Sep-09 6:03 
GeneralRe: Byte to bit array problem Pin
Luc Pattyn3-Sep-09 6:23
sitebuilderLuc Pattyn3-Sep-09 6:23 
GeneralRe: Byte to bit array problem Pin
gwithey3-Sep-09 20:47
gwithey3-Sep-09 20:47 
QuestionWhy listview cannot received the OnDragDrop event. Pin
Fired.Fish.Gmail3-Sep-09 4:33
Fired.Fish.Gmail3-Sep-09 4:33 
AnswerRe: Why listview cannot received the OnDragDrop event. Pin
Nuri Ismail3-Sep-09 5:28
Nuri Ismail3-Sep-09 5:28 
GeneralRe: Why listview cannot received the OnDragDrop event. Pin
Fired.Fish.Gmail3-Sep-09 14:57
Fired.Fish.Gmail3-Sep-09 14:57 
GeneralRe: Why listview cannot received the OnDragDrop event. Pin
Nuri Ismail3-Sep-09 21:59
Nuri Ismail3-Sep-09 21:59 
GeneralRe: Why listview cannot received the OnDragDrop event. Pin
Fired.Fish.Gmail4-Sep-09 3:48
Fired.Fish.Gmail4-Sep-09 3:48 
QuestionC# Multilanguage resx Pin
Kaare Tragethon3-Sep-09 4:29
Kaare Tragethon3-Sep-09 4:29 
AnswerRe: C# Multilanguage resx Pin
stancrm3-Sep-09 5:34
stancrm3-Sep-09 5:34 
GeneralRe: C# Multilanguage resx Pin
Kaare Tragethon3-Sep-09 5:50
Kaare Tragethon3-Sep-09 5:50 
QuestionWindowmediaplayer control Pin
Yonathan11113-Sep-09 4:21
professionalYonathan11113-Sep-09 4:21 
AnswerRe: Windowmediaplayer control Pin
Nuri Ismail3-Sep-09 5:09
Nuri Ismail3-Sep-09 5:09 
Questionflexible datagrid Pin
kruegs353-Sep-09 3:10
kruegs353-Sep-09 3:10 
AnswerRe: flexible datagrid Pin
stancrm3-Sep-09 3:21
stancrm3-Sep-09 3:21 

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.