Marvin kakuru

Marvin kakuru

  • 1.3k
  • 325
  • 155.3k

String format

Jan 20 2012 10:31 AM
 

Hi all

I am working on a small accounting project, however I a stuck now. Because in accounts I have to display some figures in brackets. For example when a figure is deductable for example (1000)

 

To arrive at this figure I used the string

 

{

int ax = System.Convert.ToInt32(textBox60.Text);

int ro = (ax / 2);

textBox55.Text = ro.ToString("(0)");

}

 

So here is my problem I need to use the value in textbox55.text in another calculation how can I convert it. I am trying the code below but it is not helping.

int sf = System.Convert.ToInt32(textBox55.Text.Substring(0).Replace("(0)", ""));

 

any help will be greatly appreciated.

Best regards.

 


Answers (1)