15,039,244 members
See more:
Hello guys,

Could you help me ,
I'm having some problem in the negative sign(-) in the integer.
all i want is to remove the negative sign in the integer
but i just dont know ....

here's my code...
```<br />
If RS1_1.Checked = True Then<br />
Temp_PC = Temp_PC + 1<br />
Else<br />
Temp_PC = Temp_PC - 1<br />
TXTSPC.Text = Temp_PC<br />
End If<br />```

Posted

## Solution 1

If you want to make a number be positive, no matter how it starts, use Math.Abs. If you want to remove the sign from a string, you can use math.Abs, or String.Replace.

## Solution 3

Use the `Math.Abs()` method.

EDIT -----------

Sorry, didn't know Christian had already suggested it. If the OP had marked it as answered, I wouldn't have bothered with a response.
v3
AspDotNetDev 14-Jul-10 14:34pm

FYI, you can just delete your answer if you like. I could too, but I figured I'd leave the decision up to you.

## Solution 4

Hi, here is a solution for your question.

if arrval is a negative value
C#
```if (arrval < 0)
{
arrval = arrval * (-1);
}```