Click here to Skip to main content
15,886,518 members
Home / Discussions / C#
   

C#

 
GeneralRe: Document/view model in C#.. Pin
Heath Stewart23-Dec-03 3:08
protectorHeath Stewart23-Dec-03 3:08 
QuestionHow to program ActiveX control in .NET Pin
young_nacs22-Dec-03 14:11
young_nacs22-Dec-03 14:11 
AnswerRe: How to program ActiveX control in .NET Pin
Heath Stewart23-Dec-03 3:02
protectorHeath Stewart23-Dec-03 3:02 
Generalemulate console mode. Pin
Ray Gregory22-Dec-03 12:13
Ray Gregory22-Dec-03 12:13 
GeneralRe: emulate console mode. Pin
Heath Stewart23-Dec-03 2:54
protectorHeath Stewart23-Dec-03 2:54 
QuestionHow to know at any time the Shift or Control key up or down Pin
god4k22-Dec-03 11:49
god4k22-Dec-03 11:49 
AnswerRe: How to know at any time the Shift or Control key up or down Pin
Heath Stewart22-Dec-03 11:56
protectorHeath Stewart22-Dec-03 11:56 
QuestionHow to format an integer into a string? Pin
Larry Antram22-Dec-03 11:37
Larry Antram22-Dec-03 11:37 
How can I format an integer into a string so that it is a fixed size (with leading zeros if necissary)?

In C++, I could do something like this:

int val = 1;
printf( "%03d", val );
And it would appear as "001" on the screen.

In C#, I can do something like this:

int val = 1;
Console.WriteLine( "{0}", val );
But I can't figure out how to format the "{0}" part so that what is printed on the screen appears as "001" instead of just "1".

Any assistance is greatly appreciated!
AnswerRe: How to format an integer into a string? Pin
Heath Stewart22-Dec-03 11:52
protectorHeath Stewart22-Dec-03 11:52 
GeneralRe: How to format an integer into a string? Pin
Larry Antram22-Dec-03 11:55
Larry Antram22-Dec-03 11:55 
GeneralRe: How to format an integer into a string? Pin
Heath Stewart22-Dec-03 12:01
protectorHeath Stewart22-Dec-03 12:01 
GeneralRe: How to format an integer into a string? Pin
J. Dunlap22-Dec-03 12:04
J. Dunlap22-Dec-03 12:04 
GeneralRe: How to format an integer into a string? Pin
Heath Stewart22-Dec-03 12:07
protectorHeath Stewart22-Dec-03 12:07 
GeneralRe: How to format an integer into a string? Pin
Nick Seng22-Dec-03 15:08
Nick Seng22-Dec-03 15:08 
GeneralRe: How to format an integer into a string? Pin
J. Dunlap22-Dec-03 15:09
J. Dunlap22-Dec-03 15:09 
AnswerRe: How to format an integer into a string? Pin
J. Dunlap22-Dec-03 12:02
J. Dunlap22-Dec-03 12:02 
GeneralXml serialization problem Pin
Wizard_0122-Dec-03 11:08
Wizard_0122-Dec-03 11:08 
GeneralRe: Xml serialization problem Pin
Heath Stewart22-Dec-03 11:12
protectorHeath Stewart22-Dec-03 11:12 
GeneralRe: Xml serialization problem Pin
Wizard_0122-Dec-03 11:26
Wizard_0122-Dec-03 11:26 
GeneralRe: Xml serialization problem Pin
Heath Stewart22-Dec-03 11:40
protectorHeath Stewart22-Dec-03 11:40 
GeneralRe: Xml serialization problem Pin
Wizard_0122-Dec-03 11:54
Wizard_0122-Dec-03 11:54 
GeneralRe: Xml serialization problem Pin
Heath Stewart22-Dec-03 11:59
protectorHeath Stewart22-Dec-03 11:59 
GeneralRe: Xml serialization problem Pin
J. Dunlap22-Dec-03 21:33
J. Dunlap22-Dec-03 21:33 
GeneralRe: Xml serialization problem Pin
Heath Stewart23-Dec-03 2:40
protectorHeath Stewart23-Dec-03 2:40 
GeneralRe: Xml serialization problem Pin
J. Dunlap23-Dec-03 10:38
J. Dunlap23-Dec-03 10:38 

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.