Click here to Skip to main content
15,896,557 members
Home / Discussions / C#
   

C#

 
GeneralRe: Message Handling in C# Pin
stancrm25-May-09 21:51
stancrm25-May-09 21:51 
GeneralRe: Message Handling in C# Pin
vishal moharikar25-May-09 23:31
vishal moharikar25-May-09 23:31 
QuestionHelp me with formatted int32 strings. [modified] Pin
Solid Green25-May-09 20:50
Solid Green25-May-09 20:50 
AnswerRe: Help me with formatted int32 strings. Pin
stancrm25-May-09 21:05
stancrm25-May-09 21:05 
GeneralRe: Help me with formatted int32 strings. Pin
Solid Green25-May-09 21:11
Solid Green25-May-09 21:11 
GeneralRe: Help me with formatted int32 strings. Pin
stancrm25-May-09 21:15
stancrm25-May-09 21:15 
GeneralRe: Help me with formatted int32 strings. Pin
Solid Green25-May-09 21:29
Solid Green25-May-09 21:29 
AnswerRe: Help me with formatted int32 strings. Pin
Tuwing.Sabado25-May-09 21:27
Tuwing.Sabado25-May-09 21:27 
Your going to format your interger to a predefine format.

Example 1
<br />
string outputString = (12345).ToString("ABCDE-0000000000");<br />
//Output: "ABCDE0000000000"<br />



Example 2
<br />
string outputString = (12345).ToString("ABCDED-0000000000");<br />
//Output: "ABCDED-0000012345"<br />


If your are expecting that the output of Example 1 is ABCDE-0000012345 you are wrong because "E-0" means Scientific notation.

Note: If any of the strings "E", "E+", "E-", "e", "e+", or "e-" are present in the format string and are followed immediately by at least one '0' character, then the number is formatted using scientific notation with an 'E' or 'e' inserted between the number and the exponent. The number of '0' characters following the scientific notation indicator determines the minimum number of digits to output for the exponent. The "E+" and "e+" formats indicate that a sign character (plus or minus) should always precede the exponent. The "E", "E-", "e", or "e-" formats indicate that a sign character should only precede negative exponents.

See Custom Numeric Format String[^ for more details.

Happing Coding...
GeneralRe: Help me with formatted int32 strings. Pin
Solid Green25-May-09 21:35
Solid Green25-May-09 21:35 
GeneralRe: Help me with formatted int32 strings. Pin
Tuwing.Sabado25-May-09 21:54
Tuwing.Sabado25-May-09 21:54 
GeneralRe: Help me with formatted int32 strings. Pin
stancrm25-May-09 21:58
stancrm25-May-09 21:58 
GeneralRe: Help me with formatted int32 strings. Pin
Solid Green25-May-09 22:20
Solid Green25-May-09 22:20 
GeneralRe: Help me with formatted int32 strings. Pin
stancrm25-May-09 22:28
stancrm25-May-09 22:28 
GeneralRe: Help me with formatted int32 strings. Pin
Guffa26-May-09 0:57
Guffa26-May-09 0:57 
GeneralRe: Help me with formatted int32 strings. Pin
Solid Green26-May-09 17:18
Solid Green26-May-09 17:18 
Questionhow to Know the language of the writing that had been made Pin
Ahmed Khallaf25-May-09 20:27
Ahmed Khallaf25-May-09 20:27 
AnswerRe: how to Know the language of the writing that had been made Pin
Rajdeep.NET is BACK25-May-09 20:44
Rajdeep.NET is BACK25-May-09 20:44 
QuestionRe: how to Know the language of the writing that had been made Pin
Ahmed Khallaf25-May-09 20:57
Ahmed Khallaf25-May-09 20:57 
AnswerRe: how to Know the language of the writing that had been made Pin
harold aptroot25-May-09 23:47
harold aptroot25-May-09 23:47 
GeneralRe: how to Know the language of the writing that had been made Pin
Pete O'Hanlon26-May-09 0:06
mvePete O'Hanlon26-May-09 0:06 
GeneralRe: how to Know the language of the writing that had been made Pin
harold aptroot26-May-09 0:49
harold aptroot26-May-09 0:49 
GeneralRe: how to Know the language of the writing that had been made Pin
Ahmed Khallaf26-May-09 4:08
Ahmed Khallaf26-May-09 4:08 
QuestionProblem in TreeView Pin
lnmca25-May-09 20:09
lnmca25-May-09 20:09 
AnswerRe: Problem in TreeView Pin
tom57200725-May-09 20:54
tom57200725-May-09 20:54 
Questionhow to make a part of string as Bold?? Pin
Hema Bairavan25-May-09 20:07
Hema Bairavan25-May-09 20:07 

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.