Click here to Skip to main content
15,897,273 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
how can i convert the value in the below
format -4567.890 to (4567.890)
Posted
Updated 2-Jan-12 16:59pm
v2
Comments
lakshmichawala 2-Jan-12 8:40am    
I just want to add "(" and ")" to the number and want to remove negative sign

This will help you....

abs(-435.456)
 
Share this answer
 
Use the Math.Abs[^] method.
 
Share this answer
 
You can use a MATH calss method or simply use like this...

C#
float myInt = -435.456;
myInt  = myInt * -1;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900