Solved

WAY URGENT:  absolute value

Posted on 2004-09-09
1
207 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:Tom Knowlton
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

738 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