Click here to Skip to main content
15,895,779 members
Home / Discussions / C#
   

C#

 
AnswerRe: create & delete dynamic rows which containa textboxes & buttons on clicking dynamicaly generated buttuns. Pin
Christian Graus6-Sep-09 12:44
protectorChristian Graus6-Sep-09 12:44 
GeneralRe: create & delete dynamic rows which containa textboxes & buttons on clicking dynamicaly generated buttuns. Pin
ambiguity_solver7-Sep-09 19:15
ambiguity_solver7-Sep-09 19:15 
QuestionBits and Bitmask - how to write? Pin
Daniel Leykauf6-Sep-09 6:30
Daniel Leykauf6-Sep-09 6:30 
AnswerRe: Bits and Bitmask - how to write? Pin
harold aptroot6-Sep-09 7:14
harold aptroot6-Sep-09 7:14 
GeneralRe: Bits and Bitmask - how to write? Pin
Daniel Leykauf6-Sep-09 9:29
Daniel Leykauf6-Sep-09 9:29 
GeneralRe: Bits and Bitmask - how to write? Pin
harold aptroot6-Sep-09 9:53
harold aptroot6-Sep-09 9:53 
GeneralRe: Bits and Bitmask - how to write? [modified] Pin
Daniel Leykauf6-Sep-09 10:19
Daniel Leykauf6-Sep-09 10:19 
AnswerRe: Bits and Bitmask - how to write? Pin
Luc Pattyn6-Sep-09 7:16
sitebuilderLuc Pattyn6-Sep-09 7:16 
Hi,

here are some elementary operations:

1.
bitnumber to bitmask: mask=1<<number;
inverse mask:="" inversemask="~mask;

2.
bitnumbers" to="" bitsmask:="" mask="(1<<(numberHi+1))-(1<<numberLo);" example:="" 2="" and="" 0="" yield="" 7

3.
hex="" output:="" string="" s="number.ToString("X8");

4.
extract" bit="" from="" number:
bool="" bitisset="(value" &="" mask)!="0;

5.
extract" bitfield="" number:
int="" fieldvalue="(value" mask)="">>bitnumLo;

6.
replace bit in number:
mask=1<<bitnum;
notmask=~mask;
value=value&notmask;
if (newbitset)="" value|="mask;

7.
replace" bit="" field="" in="" number:
mask="(1<<(bitnumHi+1))-(1<<bitnumLo);
notmask=~mask;
value=(value&notmask)" |="" (newfieldvalue<<bitnumlo);

btw:="" using="" more="" parentheses="" than="" strictly="" necessary="" to="" keep="" expressions="" unambiguous="" for="" human="" reading.

Smile | :) =""

<div="" class="ForumSig">Luc Pattyn
Badger | [badger,badger,badger,badger...] Jig | [Dance] Badger | [badger,badger,badger,badger...] Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.Jig | [Dance] Badger | [badger,badger,badger,badger...] Jig | [Dance]

QuestionRDLC C# Report shows only record...but datasource containts more then 100 records [modified] Pin
xodeblack6-Sep-09 5:40
xodeblack6-Sep-09 5:40 
AnswerRe: RDLC C# Report shows only record...but datasource containts more then 100 records Pin
Abhishek Sur6-Sep-09 10:59
professionalAbhishek Sur6-Sep-09 10:59 
GeneralRe: RDLC C# Report shows only record...but datasource containts more then 100 records Pin
xodeblack7-Sep-09 0:04
xodeblack7-Sep-09 0:04 
QuestionStarting a new process after process.close() Pin
Member 37222616-Sep-09 5:14
Member 37222616-Sep-09 5:14 
AnswerRe: Starting a new process after process.close() Pin
OriginalGriff6-Sep-09 6:03
mveOriginalGriff6-Sep-09 6:03 
GeneralRe: Starting a new process after process.close() Pin
Member 37222616-Sep-09 19:15
Member 37222616-Sep-09 19:15 
GeneralRe: Starting a new process after process.close() Pin
OriginalGriff6-Sep-09 21:36
mveOriginalGriff6-Sep-09 21:36 
GeneralRe: Starting a new process after process.close() Pin
Member 37222616-Sep-09 23:24
Member 37222616-Sep-09 23:24 
GeneralRe: Starting a new process after process.close() Pin
Member 37222616-Sep-09 23:41
Member 37222616-Sep-09 23:41 
GeneralRe: Starting a new process after process.close() Pin
OriginalGriff6-Sep-09 23:52
mveOriginalGriff6-Sep-09 23:52 
GeneralRe: Starting a new process after process.close() Pin
Member 37222617-Sep-09 0:09
Member 37222617-Sep-09 0:09 
AnswerRe: Starting a new process after process.close() Pin
Alan N6-Sep-09 22:16
Alan N6-Sep-09 22:16 
GeneralRe: Starting a new process after process.close() Pin
Member 37222616-Sep-09 23:26
Member 37222616-Sep-09 23:26 
GeneralRe: Starting a new process after process.close() Pin
Alan N7-Sep-09 3:45
Alan N7-Sep-09 3:45 
GeneralRe: Starting a new process after process.close() Pin
Member 37222617-Sep-09 9:56
Member 37222617-Sep-09 9:56 
AnswerRe: Starting a new process after process.close() Pin
Alan N7-Sep-09 10:59
Alan N7-Sep-09 10:59 
QuestionUsing Code in a DLL Pin
Bram van Kampen6-Sep-09 4:27
Bram van Kampen6-Sep-09 4:27 

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.