RE: C # question

Hi Celia,

Sure no problem.

-Simon

From: celia-rodriguez@xxxxxxxxxxxxx
To: programmingblind@xxxxxxxxxxxxx
Subject: RE: C # question
Date: Sun, 4 Apr 2010 02:35:56 -0500



















Hi Simon,

 

Do you mind emailing me off line??

 

Celia-rodriguez@xxxxxxxxxxxxx

Thanks,

Celia

 

 





From:
programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Simon
Gaudiuso

Sent: Wednesday, March 31, 2010 9:03 PM

To: programmingblind@xxxxxxxxxxxxx

Subject: RE: C # question





 

How about:

String.Format("{0:C2}", Volume);



-Simon







From: celia-rodriguez@xxxxxxxxxxxxx

To: programmingblind@xxxxxxxxxxxxx

Subject: RE: C # question

Date: Wed, 31 Mar 2010 19:04:29 -0500



Hi Simon,

 

Thanks
for your response.

I
had already tried putting in the quotes  and it did not work.  It
compiles but at run time it gives me an error.  Your second suggestion
works, but instead of giving me 3.77 it returns 37.7.  I tried a couple of
things like

{0:00.##}
and it still return 37.7 I tried {0:.##} and it still did not return what I
need. Any other ideas.

 

Thank
You,

Celia

 





From:
programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Simon
Gaudiuso

Sent: Wednesday, March 31, 2010 5:54 PM

To: programmingblind@xxxxxxxxxxxxx

Subject: RE: C # question





 

You forgot to put in the quotes,
String.Format expects the first parameter to be a string hence the format.

TextBox = String.Format("{0:D2}", Volume);

If that doesn't work you can try:

String.Format("{0:0.##}", Volume);



-Simon



> From: celia-rodriguez@xxxxxxxxxxxxx

> To: programmingblind@xxxxxxxxxxxxx

> Subject: RE: C # question

> Date: Wed, 31 Mar 2010 17:29:22 -0500

> 

> Hi Varun,

> 

> Can you tell me how to display 3.3333 in a text box as 3.33

> My teacher gave us the below code but the compilar does not like it.

> I know you use the String.Format The below is what I was strying to code,

> but I keep getting errors.

> TextBox = String.Format({0:D2}, Volume);

> The compilar does not like the { nor the :.

> Can you help?

> 

> Thank you,

> Celia

> 

> __________

> View the list's information and change your settings at 

> http://www.freelists.org/list/programmingblind

> 







The
New Busy is not the old busy. Search, chat and e-mail from your inbox. Get
started.



 







The
New Busy is not the old busy. Search, chat and e-mail from your inbox. Get 
started.

                                          
_________________________________________________________________
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3

Other related posts: