Click here to Skip to main content
15,920,645 members
Home / Discussions / C#
   

C#

 
GeneralRe: value vs. reference gripe Pin
leppie19-Jun-02 11:29
leppie19-Jun-02 11:29 
GeneralRe: value vs. reference gripe Pin
Nish Nishant19-Jun-02 11:55
sitebuilderNish Nishant19-Jun-02 11:55 
GeneralRe: value vs. reference gripe Pin
leppie19-Jun-02 23:18
leppie19-Jun-02 23:18 
GeneralRe: value vs. reference gripe Pin
Richard Deeming20-Jun-02 0:19
mveRichard Deeming20-Jun-02 0:19 
GeneralRe: value vs. reference gripe Pin
Marc Clifton20-Jun-02 1:37
mvaMarc Clifton20-Jun-02 1:37 
GeneralRe: value vs. reference gripe Pin
Richard Deeming20-Jun-02 3:39
mveRichard Deeming20-Jun-02 3:39 
GeneralRe: value vs. reference gripe Pin
Marc Clifton20-Jun-02 7:09
mvaMarc Clifton20-Jun-02 7:09 
QuestionC# bool to int conversion. Does it exist? Pin
Marc Clifton19-Jun-02 9:55
mvaMarc Clifton19-Jun-02 9:55 
OK, I've got a bool data type, and I want to convert this to a 0 or 1 so I can create an SQL statement, having defined a field in Access as Yes/No.

How do I do that? Do I really have to code:

bool b;
int i=b==false ? 0 : 1;

I can't believe there isn't a conversion to a 0/1!!!

Or even worse, do I subclass the System.Boolean and create my conversion in a class? Argh. Does anyone else share my frustration?

Thanks in advance!

Marc
AnswerRe: C# bool to int conversion. Does it exist? Pin
Chris Rickard19-Jun-02 10:06
Chris Rickard19-Jun-02 10:06 
GeneralRe: C# bool to int conversion. Does it exist? Pin
Marc Clifton19-Jun-02 10:17
mvaMarc Clifton19-Jun-02 10:17 
GeneralClear the Console Pin
Mauricio Ritter19-Jun-02 6:41
Mauricio Ritter19-Jun-02 6:41 
GeneralRe: Clear the Console Pin
Nick Parker21-Jun-02 8:08
protectorNick Parker21-Jun-02 8:08 
Generalfinding the process's HWND Pin
eynats19-Jun-02 2:33
eynats19-Jun-02 2:33 
GeneralRe: finding the process's HWND Pin
Feng Qin19-Jun-02 3:01
Feng Qin19-Jun-02 3:01 
GeneralRe: finding the process's HWND Pin
eynats19-Jun-02 3:34
eynats19-Jun-02 3:34 
GeneralRe: finding the process's HWND Pin
Mazdak19-Jun-02 5:50
Mazdak19-Jun-02 5:50 
GeneralRe: finding the process's HWND Pin
Chris Rickard19-Jun-02 4:32
Chris Rickard19-Jun-02 4:32 
GeneralRe: finding the process's HWND Pin
leppie19-Jun-02 10:50
leppie19-Jun-02 10:50 
GeneralExporting functions Pin
leppie18-Jun-02 23:56
leppie18-Jun-02 23:56 
GeneralRe: Exporting functions Pin
Feng Qin19-Jun-02 1:01
Feng Qin19-Jun-02 1:01 
GeneralRe: Exporting functions Pin
leppie19-Jun-02 1:22
leppie19-Jun-02 1:22 
GeneralRe: Exporting functions Pin
Nish Nishant19-Jun-02 1:30
sitebuilderNish Nishant19-Jun-02 1:30 
GeneralRe: Exporting functions Pin
leppie19-Jun-02 2:04
leppie19-Jun-02 2:04 
GeneralRe: Exporting functions Pin
leppie19-Jun-02 11:20
leppie19-Jun-02 11:20 
GeneralRe: Exporting functions Pin
Nish Nishant19-Jun-02 11:34
sitebuilderNish Nishant19-Jun-02 11:34 

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.