Trailing minus in display

  • Thread starter Thread starter DaveO.
  • Start date Start date
D

DaveO.

Hello,

Is there a simple/standard way to display a negative number (integer in
this case) with a trailing minus sign? I've looked in help on
formatting, but I don't see a way to do it.

I'm actually on .NET Compact Framework, but this seemed more like a VB
question.


Thanks,
DaveO.
 
You can try custom formats for the ToString() function.

e.g.
Dim num As Integer = -17
MessageBox.Show(num.ToString("00;00-"))


Check out the custom format strings on ToString() in the help for more
details

hth,
Alan.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top