Solved

WAY URGENT:  absolute value

Posted on 2004-09-09
1
201 Views
Last Modified: 2012-05-05
case("Amount"):
                                                      strInstanceValue = "$" + formatLIB.FormatAsCurrency(strInstanceValue).ToString();
                                                      if(strInstanceValue == "$0")
                                                      {
                                                            strInstanceValue = "";
                                                      }                                                      
                                                      break;                                                


====================================

I need the code above changed so it displays absolute value.
0
Comment
Question by:knowlton
1 Comment
 
LVL 24

Accepted Solution

by:
Justin_W earned 500 total points
ID: 12019391
Use something like this:
   strInstanceValue = Math.Abs(Decimal.Parse(strInstanceValue)).ToString();
   strInstanceValue = "$" + formatLIB.FormatAsCurrency(strInstanceValue ).ToString();
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question