|
-
March 27th, 2010, 01:00 PM
#1
[RESOLVED] 17000 -> 17.000 and sharp margin?
Hello,
I have three values, for instance 17000, 12345 and 4655. Is there any special way to present them like below? Please note the dots(.) and the sharp left margin. (NET3.5 / VS 2008 )
Code:
number1 17.000
number2: 12.345
result: 4.655
-
March 27th, 2010, 04:45 PM
#2
Re: 17000 -> 17.000 and sharp margin?
 Originally Posted by LoopString
Code:
number1 17.000
number2: 12.345
result: 4.655
Simple format your string. How is the output doen? Console application?
 Jonny Poet
To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
If anyone felt he has got help, show it in rating the post.
Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
My latest articles :
Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7
-
March 27th, 2010, 04:56 PM
#3
Re: 17000 -> 17.000 and sharp margin?
Thanks for the answer, yes it is console application, playing around in visual studio.
-
March 27th, 2010, 05:46 PM
#4
Re: 17000 -> 17.000 and sharp margin?
 Originally Posted by LoopString
Thanks for the answer, yes it is console application, playing around in visual studio.
Code:
int a = 17000;
int b = 12345;
int c = a - b;
Console.WriteLine("number1 {0:0,0}",a);
Console.WriteLine("number2 {0:0,0}", b);
Console.WriteLine("result {0:0,0}", c);
 Jonny Poet
To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
If anyone felt he has got help, show it in rating the post.
Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
My latest articles :
Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7
-
March 27th, 2010, 06:14 PM
#5
Re: 17000 -> 17.000 and sharp margin?
Thank you JonnyPoet, your code is like poetry.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|