Click here to Skip to main content
15,906,106 members
Home / Discussions / C#
   

C#

 
GeneralRe: Events through .NET Remoting Pin
S. Senthil Kumar8-Apr-06 18:58
S. Senthil Kumar8-Apr-06 18:58 
Questionany one know why the key down don't work? Pin
abstar6-Apr-06 21:24
abstar6-Apr-06 21:24 
AnswerRe: any one know why the key down don't work? Pin
scoroop6-Apr-06 21:32
scoroop6-Apr-06 21:32 
AnswerRe: any one know why the key down don't work? Pin
Roy Heil8-Apr-06 14:55
professionalRoy Heil8-Apr-06 14:55 
Questionbinary to decimal conversion Pin
eggie56-Apr-06 20:36
eggie56-Apr-06 20:36 
AnswerRe: binary to decimal conversion Pin
Guffa6-Apr-06 21:00
Guffa6-Apr-06 21:00 
GeneralRe: binary to decimal conversion Pin
eggie56-Apr-06 21:06
eggie56-Apr-06 21:06 
GeneralRe: binary to decimal conversion Pin
User 66587-Apr-06 3:50
User 66587-Apr-06 3:50 
If it's just an 8-bit to byte conversion this will do the job:

byte value = 0;
bool[] bits = { false, true, true, false, true, false, false, true };

for (byte b = 0; b < bits.Length; b++)
{
	value <<= 1;
	if (bits[b])
		value |= 0x1;
}


This will also work if you change byte to int and increase the array length to a maximum of 32 boolean values Smile | :)

regards

modified 12-Sep-18 21:01pm.

QuestionCommon tasks in base classes, how? Pin
moazzamahmed6-Apr-06 20:05
moazzamahmed6-Apr-06 20:05 
AnswerRe: Common tasks in base classes, how? Pin
Colin Angus Mackay6-Apr-06 21:05
Colin Angus Mackay6-Apr-06 21:05 
GeneralRe: Common tasks in base classes, how? Pin
moazzamahmed6-Apr-06 21:59
moazzamahmed6-Apr-06 21:59 
AnswerRe: Common tasks in base classes, how? Pin
junglerover776-Apr-06 21:07
junglerover776-Apr-06 21:07 
GeneralRe: Common tasks in base classes, how? Pin
Colin Angus Mackay6-Apr-06 22:31
Colin Angus Mackay6-Apr-06 22:31 
QuestionHow to avoid last event from execution when page is refreshed Pin
SrilakshmiD6-Apr-06 20:00
SrilakshmiD6-Apr-06 20:00 
AnswerRe: How to avoid last event from execution when page is refreshed Pin
junglerover776-Apr-06 20:54
junglerover776-Apr-06 20:54 
AnswerRe: How to avoid last event from execution when page is refreshed Pin
sathish s6-Apr-06 23:47
sathish s6-Apr-06 23:47 
QuestionHelp regarding DataGrid Pin
Taimoor Mirza6-Apr-06 19:51
Taimoor Mirza6-Apr-06 19:51 
AnswerRe: Help regarding DataGrid Pin
Maqsood Ahmed7-Apr-06 17:49
Maqsood Ahmed7-Apr-06 17:49 
Questionhow to start a programe when the system is logged in. Pin
Sunny H6-Apr-06 19:40
Sunny H6-Apr-06 19:40 
AnswerRe: how to start a programe when the system is logged in. Pin
alexey N6-Apr-06 19:47
alexey N6-Apr-06 19:47 
AnswerRe: how to start a programe when the system is logged in. Pin
junglerover776-Apr-06 19:56
junglerover776-Apr-06 19:56 
Questionpass more than one parameters to my stored procedure at a time Pin
Sunny H6-Apr-06 19:36
Sunny H6-Apr-06 19:36 
AnswerRe: pass more than one parameters to my stored procedure at a time Pin
junglerover776-Apr-06 20:06
junglerover776-Apr-06 20:06 
QuestionProblem With TreeView Pin
pavanabollineni6-Apr-06 18:45
pavanabollineni6-Apr-06 18:45 
AnswerRe: Problem With TreeView Pin
sathish s6-Apr-06 19:33
sathish s6-Apr-06 19:33 

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.