Click here to Skip to main content
15,907,493 members
Home / Discussions / C#
   

C#

 
QuestionProperties Window File Dialog Pin
thrakazog30-Aug-08 13:30
thrakazog30-Aug-08 13:30 
AnswerRe: Properties Window File Dialog Pin
Mbah Dhaim30-Aug-08 14:32
Mbah Dhaim30-Aug-08 14:32 
AnswerRe: Properties Window File Dialog Pin
Thomas Stockwell30-Aug-08 14:33
professionalThomas Stockwell30-Aug-08 14:33 
AnswerRe: Properties Window File Dialog Pin
Dr. Emmett Brown30-Aug-08 14:45
Dr. Emmett Brown30-Aug-08 14:45 
QuestionHow can we disable BUMB sound ? Pin
Mohammad Dayyan30-Aug-08 10:20
Mohammad Dayyan30-Aug-08 10:20 
AnswerRe: How can we disable BUMB sound ? Pin
Christian Graus30-Aug-08 14:47
protectorChristian Graus30-Aug-08 14:47 
GeneralRe: How can we disable BUMB sound ? Pin
Mohammad Dayyan30-Aug-08 23:06
Mohammad Dayyan30-Aug-08 23:06 
GeneralRe: How can we disable BUMB sound ? Pin
Guffa31-Aug-08 4:03
Guffa31-Aug-08 4:03 
GeneralRe: How can we disable BUMB sound ? Pin
Mohammad Dayyan31-Aug-08 4:31
Mohammad Dayyan31-Aug-08 4:31 
GeneralRe: How can we disable BUMB sound ? Pin
Guffa31-Aug-08 10:32
Guffa31-Aug-08 10:32 
GeneralRe: How can we disable BUMB sound ? Pin
Mohammad Dayyan2-Sep-08 4:37
Mohammad Dayyan2-Sep-08 4:37 
QuestionCreating Blank if zero decimal format string Pin
AndrusM30-Aug-08 6:57
AndrusM30-Aug-08 6:57 
AnswerRe: Creating Blank if zero decimal format string Pin
Wendelius30-Aug-08 7:50
mentorWendelius30-Aug-08 7:50 
GeneralRe: Creating Blank if zero decimal format string Pin
AndrusM31-Aug-08 5:58
AndrusM31-Aug-08 5:58 
GeneralRe: Creating Blank if zero decimal format string Pin
Wendelius31-Aug-08 6:33
mentorWendelius31-Aug-08 6:33 
GeneralRe: Creating Blank if zero decimal format string Pin
AndrusM31-Aug-08 9:57
AndrusM31-Aug-08 9:57 
GeneralRe: Creating Blank if zero decimal format string Pin
Wendelius31-Aug-08 10:24
mentorWendelius31-Aug-08 10:24 
From the manual:
If format is null or an empty string, the return value of this instance is formatted with the general numeric format specifier ("G").

Simple test case:
System.Diagnostics.Debug.WriteLine("-------");
System.Diagnostics.Debug.WriteLine("Using F");
System.Diagnostics.Debug.WriteLine("-------");
System.Diagnostics.Debug.WriteLine("(0m).ToString(\"F\") => " + (0m).ToString("F"));
System.Diagnostics.Debug.WriteLine("(1.10m).ToString(\"F\") => " + (1.10m).ToString("F"));
System.Diagnostics.Debug.WriteLine("(1.1m).ToString(\"F\") => " + (1.1m).ToString("F"));
System.Diagnostics.Debug.WriteLine("(1.123m).ToString(\"F\") => " + (1.123m).ToString("F"));

System.Diagnostics.Debug.WriteLine("------------------");
System.Diagnostics.Debug.WriteLine("Using empty string");
System.Diagnostics.Debug.WriteLine("------------------");
System.Diagnostics.Debug.WriteLine("(0m).ToString() => " + (0m).ToString(""));
System.Diagnostics.Debug.WriteLine("(1.10m).ToString() => " + (1.10m).ToString(""));
System.Diagnostics.Debug.WriteLine("(1.1m).ToString() => " + (1.1m).ToString(""));
System.Diagnostics.Debug.WriteLine("(1.123m).ToString() => " + (1.123m).ToString(""));

System.Diagnostics.Debug.WriteLine("-------");
System.Diagnostics.Debug.WriteLine("Using G");
System.Diagnostics.Debug.WriteLine("-------");
System.Diagnostics.Debug.WriteLine("(0m).ToString(\"G\") => " + (0m).ToString("G"));
System.Diagnostics.Debug.WriteLine("(1.10m).ToString(\"G\") => " + (1.10m).ToString("G"));
System.Diagnostics.Debug.WriteLine("(1.1m).ToString(\"G\") => " + (1.1m).ToString("G"));
System.Diagnostics.Debug.WriteLine("(1.123m).ToString(\"G\") => " + (1.123m).ToString("G"));

results:
-------
Using F
-------
(0m).ToString("F") => 0,00
(1.10m).ToString("F") => 1,10
(1.1m).ToString("F") => 1,10
(1.123m).ToString("F") => 1,12
------------------
Using empty string
------------------
(0m).ToString() => 0
(1.10m).ToString() => 1,10
(1.1m).ToString() => 1,1
(1.123m).ToString() => 1,123
-------
Using G
-------
(0m).ToString("G") => 0
(1.10m).ToString("G") => 1,10
(1.1m).ToString("G") => 1,1
(1.123m).ToString("G") => 1,123


So are yuo actually looking for "G" like behaviour? AFAIK you must implement your own converter which has the knowledge of the actual input string.
GeneralRe: Creating Blank if zero decimal format string Pin
AndrusM31-Aug-08 10:35
AndrusM31-Aug-08 10:35 
GeneralRe: Creating Blank if zero decimal format string Pin
Wendelius31-Aug-08 10:58
mentorWendelius31-Aug-08 10:58 
QuestionCommandLineProcess Pin
netDeveloper30-Aug-08 5:34
netDeveloper30-Aug-08 5:34 
AnswerRe: CommandLineProcess Pin
Daniel Grunwald30-Aug-08 10:09
Daniel Grunwald30-Aug-08 10:09 
GeneralRe: CommandLineProcess Pin
netDeveloper31-Aug-08 0:26
netDeveloper31-Aug-08 0:26 
QuestionHow not to close the window Pin
Silvyster30-Aug-08 2:52
Silvyster30-Aug-08 2:52 
AnswerRe: How not to close the window Pin
Anthony Mushrow30-Aug-08 2:58
professionalAnthony Mushrow30-Aug-08 2:58 
AnswerRe: How not to close the window Pin
Abhijit Jana30-Aug-08 3:03
professionalAbhijit Jana30-Aug-08 3:03 

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.