I have converted the value of my text box to an int by using the Convert.ToInt32 method.

I tried doing this a second time by using the explicit cast (int) but it returns the connot convert type 'string' to 'int'. I was wonderding if it does the same thing as the Convert.ToInt32 method.

For example does:

(int)textBoxSalary.Text;

Do the same thing as:

Convert.ToInt32(textBoxSalary.Text);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.