how to convert the string format to integer

denesh neupane 121 Reputation points
2022-06-22T00:27:23.49+00:00

if the color of textbox is white then the textbox text is 0xffffff
how can i used it as a integer

Color myColor = textBox26.BackColor;
int nColorWin32 = ColorTranslator.ToWin32(myColor);
textBox26.Text = "0x" + string.Format("{0:X6}", nColorWin32);

int value;
Int32.TryParse(textBox26.Text, out value);
//i need to change the color of graph according to the textbox color
layer.addDataSet(darray, value);

Developer technologies | .NET | Other
Developer technologies | C#
0 comments No comments
{count} votes

Accepted answer
  1. Castorix31 90,686 Reputation points
    2022-06-22T01:05:29.6+00:00

    You can do :

    int value = Convert.ToInt32(textBox26.Text, 16);  
    

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.