Click here to Skip to main content
15,900,511 members
Home / Discussions / C#
   

C#

 
Generalprobs with print: Generic/Text only :confused: Pin
troels_sorensen22-Jul-03 4:09
troels_sorensen22-Jul-03 4:09 
GeneralRe: probs with print: Generic/Text only :confused: Pin
troels_sorensen22-Jul-03 23:52
troels_sorensen22-Jul-03 23:52 
GeneralCall an unknown object Pin
Ista22-Jul-03 3:57
Ista22-Jul-03 3:57 
GeneralRe: Call an unknown object Pin
David Stone22-Jul-03 4:39
sitebuilderDavid Stone22-Jul-03 4:39 
GeneralRe: Call an unknown object Pin
Ista22-Jul-03 8:15
Ista22-Jul-03 8:15 
GeneralRe: Call an unknown object Pin
David Stone22-Jul-03 10:23
sitebuilderDavid Stone22-Jul-03 10:23 
GeneralC++ to C# Pin
zoltan_ie22-Jul-03 0:43
zoltan_ie22-Jul-03 0:43 
GeneralRe: C++ to C# Pin
Mazdak22-Jul-03 0:53
Mazdak22-Jul-03 0:53 
GeneralRe: C++ to C# Pin
zoltan_ie22-Jul-03 0:56
zoltan_ie22-Jul-03 0:56 
GeneralRe: C++ to C# Pin
Mazdak22-Jul-03 1:23
Mazdak22-Jul-03 1:23 
GeneralRe: C++ to C# Pin
zoltan_ie22-Jul-03 1:40
zoltan_ie22-Jul-03 1:40 
GeneralRe: C++ to C# Pin
Mazdak22-Jul-03 1:46
Mazdak22-Jul-03 1:46 
GeneralRe: C++ to C# Pin
Ista22-Jul-03 3:56
Ista22-Jul-03 3:56 
GeneralRe: C++ to C# Pin
Meysam Mahfouzi22-Jul-03 1:46
Meysam Mahfouzi22-Jul-03 1:46 
GeneralRe: C++ to C# Pin
zoltan_ie22-Jul-03 1:49
zoltan_ie22-Jul-03 1:49 
GeneralRe: C++ to C# Pin
Meysam Mahfouzi22-Jul-03 1:58
Meysam Mahfouzi22-Jul-03 1:58 
GeneralRe: C++ to C# Pin
Frank Olorin Rizzi22-Jul-03 7:20
Frank Olorin Rizzi22-Jul-03 7:20 
GeneralRe: C++ to C# Pin
Jim Stewart22-Jul-03 2:50
Jim Stewart22-Jul-03 2:50 
GeneralRe: C++ to C# Pin
James T. Johnson22-Jul-03 8:10
James T. Johnson22-Jul-03 8:10 
Why keep it an int at all?

bool done = false;
 
...
 
if( done )
  break;
C doesn't have a concept of a boolean so you had to use some other data type to represent one, most code uses an int to hold a boolean value. C++ has bool datatype, but since the Win32 API is C based you typically don't use it favoring an int or the #defined BOOL.

Like C++, C# has a bool data type, unlike C++ though there isn't any legacy code to be aware of so you should use it whenever necessary.

[edit]And unlike C/C++, the bool datatype has a true/false value instead of a non-zero/zero value. So you need to assign true to done instead of a 1.

James

"I despise the city and much prefer being where a traffic jam means a line-up at McDonald's"
Me when telling a friend why I wouldn't want to live with him

GeneralRe: C++ to C# Pin
Joe Woodbury22-Jul-03 8:16
professionalJoe Woodbury22-Jul-03 8:16 
GeneralKey Event Pin
don7cry22-Jul-03 0:43
don7cry22-Jul-03 0:43 
GeneralGDI+ FillPolygon Pin
r921-Jul-03 23:43
r921-Jul-03 23:43 
GeneralRe: GDI+ FillPolygon Pin
Valeria Bogdevich22-Jul-03 3:24
Valeria Bogdevich22-Jul-03 3:24 
GeneralRe: GDI+ FillPolygon Pin
r922-Jul-03 3:33
r922-Jul-03 3:33 
GeneralRe: GDI+ FillPolygon Pin
Valeria Bogdevich22-Jul-03 3:49
Valeria Bogdevich22-Jul-03 3:49 

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.