Click here to Skip to main content
15,926,596 members
Home / Discussions / C#
   

C#

 
AnswerRe: Update progressbar , text box from thread Pin
Simon P Stevens1-Dec-08 23:47
Simon P Stevens1-Dec-08 23:47 
AnswerRe: Update progressbar , text box from thread Pin
Giorgi Dalakishvili2-Dec-08 1:58
mentorGiorgi Dalakishvili2-Dec-08 1:58 
AnswerRe: Update progressbar , text box from thread Pin
Samer Aburabie2-Dec-08 10:52
Samer Aburabie2-Dec-08 10:52 
QuestionUsing Binary Operators Pin
MatthysDT1-Dec-08 23:15
MatthysDT1-Dec-08 23:15 
AnswerRe: Using Binary Operators Pin
Simon P Stevens1-Dec-08 23:21
Simon P Stevens1-Dec-08 23:21 
AnswerRe: Using Binary Operators Pin
Guffa2-Dec-08 0:53
Guffa2-Dec-08 0:53 
AnswerRe: Using Binary Operators Pin
Alan Balkany2-Dec-08 4:05
Alan Balkany2-Dec-08 4:05 
AnswerRe: Using Binary Operators Pin
ely_bob2-Dec-08 6:35
professionalely_bob2-Dec-08 6:35 
C# doesn't use (int)1 as true, so you will need to use (x==y && y==1)
see the link below, but to make a long story short, the C# compiler tends
to be more like a binary child, it likes things in strong typed format,
as such if there is any disention inside its ranks, it will just throw a compilation error.
just try something like

int a = Math.Round(Math.PI,0);


which throws Error:

Cannot implicitly convert type 'double' to 'int'.<br />
An explicit conversion exists (are you missing a cast?)


and can be resolved by

int a = (int)Math.Round(Math.PI,0);


but you cannot use:
int a = 2, b = 3;
if((bool)(a)&&(bool)(b)){}//Does NOT work


alternativly you can restructure to just use bools

bool bx;    //     int ix;
bx = false; //     ix = 0;
bx != bx;   //     ix = ix % 2;




or make an operator
BinaryAnd(int x,int y)
{
     if(x==1&&y==1){return true;}
     return false;
}


you should say more about how you intend to use it,
because there are lots of ways to get the same result.


clicky...hope it helps, my C is a bit rusty, it's been a couple of years. Confused | :confused:
GeneralRe: Using Binary Operators Pin
MatthysDT2-Dec-08 19:15
MatthysDT2-Dec-08 19:15 
QuestionDifferent settings for the same application Pin
Natza Mitzi1-Dec-08 23:02
Natza Mitzi1-Dec-08 23:02 
AnswerRe: Different settings for the same application Pin
Christian Graus1-Dec-08 23:41
protectorChristian Graus1-Dec-08 23:41 
GeneralRe: Different settings for the same application Pin
Natza Mitzi2-Dec-08 2:25
Natza Mitzi2-Dec-08 2:25 
AnswerRe: Different settings for the same application Pin
#realJSOP1-Dec-08 23:52
professional#realJSOP1-Dec-08 23:52 
GeneralRe: Different settings for the same application Pin
Natza Mitzi2-Dec-08 3:05
Natza Mitzi2-Dec-08 3:05 
GeneralRe: Different settings for the same application Pin
#realJSOP2-Dec-08 4:39
professional#realJSOP2-Dec-08 4:39 
GeneralRe: Different settings for the same application Pin
Natza Mitzi3-Dec-08 6:39
Natza Mitzi3-Dec-08 6:39 
AnswerRe: Different settings for the same application Pin
moon_stick3-Dec-08 4:57
moon_stick3-Dec-08 4:57 
GeneralGood Idea : ) Pin
Natza Mitzi3-Dec-08 6:29
Natza Mitzi3-Dec-08 6:29 
Questionhow to restart the thread Pin
renuga52981-Dec-08 21:33
renuga52981-Dec-08 21:33 
AnswerRe: how to restart the thread Pin
leppie1-Dec-08 21:37
leppie1-Dec-08 21:37 
GeneralRe: how to restart the thread Pin
renuga52981-Dec-08 22:31
renuga52981-Dec-08 22:31 
AnswerRe: how to restart the thread Pin
N a v a n e e t h1-Dec-08 22:38
N a v a n e e t h1-Dec-08 22:38 
GeneralRe: how to restart the thread Pin
renuga52981-Dec-08 23:35
renuga52981-Dec-08 23:35 
GeneralRe: how to restart the thread Pin
MickCurley1-Dec-08 23:52
MickCurley1-Dec-08 23:52 
Questionexecuting multiple dos command Pin
sumit70341-Dec-08 21:28
sumit70341-Dec-08 21:28 

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.