Click here to Skip to main content
15,887,361 members
Home / Discussions / C#
   

C#

 
QuestionLimiting the retrived results using ODBC on MS access [modified] Pin
cbh_24-Nov-06 22:01
cbh_24-Nov-06 22:01 
AnswerRe: Limiting the retrived results using ODBC on MS access Pin
Eduard Keilholz26-Nov-06 20:36
Eduard Keilholz26-Nov-06 20:36 
QuestionPacking and unpacking bits Pin
ScruffyDuck24-Nov-06 21:31
ScruffyDuck24-Nov-06 21:31 
AnswerRe: Packing and unpacking bits Pin
Guffa24-Nov-06 23:16
Guffa24-Nov-06 23:16 
GeneralRe: Packing and unpacking bits Pin
ScruffyDuck24-Nov-06 23:33
ScruffyDuck24-Nov-06 23:33 
GeneralRe: Packing and unpacking bits Pin
CPallini25-Nov-06 0:07
mveCPallini25-Nov-06 0:07 
AnswerRe: Packing and unpacking bits Pin
Guffa25-Nov-06 0:34
Guffa25-Nov-06 0:34 
GeneralRe: Packing and unpacking bits Pin
ScruffyDuck25-Nov-06 1:08
ScruffyDuck25-Nov-06 1:08 
OK apologies for not being very precise. The file I am dealing with is very large and the packed information forms a very small part of it. When extracted it has to go through another transformation. What I am trying to understand is generally how to write a function which will take a set of bits out of a larger set and return their value as an Integer. For example if I have 32 bits in a UInt32 then this is what I tried:

public static UInt32 Dword (UInt32 data, int start, int end) {
UInt32 result = data << (31-end+1);
result = result >> (31 - end + 1 + start);
return result;
}

I am sure the code is very poor with magic numbers and so on but if I take the example of cutting out bits 3 thru 7 inclusive then I left shift to remove bits 8 thru 31 then right shift until bit 3 is not bit 0. I have absolutely no experience of dealing with bit manipulation.

Apologies again if I am not clear but it is because I really don't know what I am doing here Smile | :)


Jon

GeneralRe: Packing and unpacking bits Pin
Luc Pattyn25-Nov-06 3:10
sitebuilderLuc Pattyn25-Nov-06 3:10 
GeneralRe: Packing and unpacking bits Pin
Guffa25-Nov-06 4:14
Guffa25-Nov-06 4:14 
GeneralRe: Packing and unpacking bits Pin
ScruffyDuck25-Nov-06 6:19
ScruffyDuck25-Nov-06 6:19 
QuestionHow to Add ToolStripButtons on a Child Form Dynamically... Pin
IamHuM24-Nov-06 21:21
IamHuM24-Nov-06 21:21 
QuestionUPDATING .MDB (please help me guyz!) Pin
Muammar©24-Nov-06 20:52
Muammar©24-Nov-06 20:52 
Questionconvert Java source codes to C# source codes? Pin
George_George24-Nov-06 20:26
George_George24-Nov-06 20:26 
AnswerRe: convert Java source codes to C# source codes? Pin
CWIZO25-Nov-06 4:06
CWIZO25-Nov-06 4:06 
GeneralRe: convert Java source codes to C# source codes? Pin
George_George25-Nov-06 21:28
George_George25-Nov-06 21:28 
QuestionCall one function from another Pin
Andrei Ungureanu24-Nov-06 13:15
Andrei Ungureanu24-Nov-06 13:15 
AnswerRe: Call one function from another Pin
Amar Chaudhary24-Nov-06 13:21
Amar Chaudhary24-Nov-06 13:21 
AnswerRe: Call one function from another Pin
Karthik Kalyanasundaram24-Nov-06 17:19
Karthik Kalyanasundaram24-Nov-06 17:19 
AnswerRe: Call one function from another Pin
Guffa24-Nov-06 23:19
Guffa24-Nov-06 23:19 
QuestionConnection String Pin
btota24-Nov-06 12:47
btota24-Nov-06 12:47 
AnswerRe: Connection String Pin
Andrei Ungureanu24-Nov-06 13:10
Andrei Ungureanu24-Nov-06 13:10 
AnswerRe: Connection String Pin
Dominic Pettifer24-Nov-06 13:47
Dominic Pettifer24-Nov-06 13:47 
QuestionHow to use multiple panels in a windows form Pin
Sonu.T24-Nov-06 12:38
Sonu.T24-Nov-06 12:38 
AnswerRe: How to use multiple panels in a windows form Pin
S. Senthil Kumar24-Nov-06 19:51
S. Senthil Kumar24-Nov-06 19:51 

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.