Click here to Skip to main content
15,888,330 members
Home / Discussions / C#
   

C#

 
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 
How to create format string for decimal data type
which shows blank if number is zero and otherwize in default format?

I tried format string f;;# but this shows f for nonzero numbers.

Is it possible to create such string for .NET decimal ToString() ?

Andrus.


using System.Windows.Forms;

class AppMainEntry
{
static void Main()
{
// Expected: 0.40 actual: f
MessageBox.Show((0.40m).ToString("f;;#"));

// expected: 123.40 actual: f
MessageBox.Show((123.40m).ToString("f;;#"));

// expected: 123.4 actual: f
MessageBox.Show((123.4m).ToString("f;;#"));

// OK: expected: empty actual: empty
MessageBox.Show((0m).ToString("f;;#"));
}
}

Andrus

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 
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 
AnswerRe: How not to close the window Pin
DaveyM6930-Aug-08 8:43
professionalDaveyM6930-Aug-08 8:43 
QuestionListviewcontrol and background color Pin
Yustme30-Aug-08 1:09
Yustme30-Aug-08 1:09 
AnswerRe: Listviewcontrol and background color Pin
Wendelius30-Aug-08 3:02
mentorWendelius30-Aug-08 3:02 
GeneralRe: Listviewcontrol and background color Pin
Yustme30-Aug-08 7:47
Yustme30-Aug-08 7:47 

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.