Solved

WAY URGENT:  absolute value

Posted on 2004-09-09
1
204 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

790 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