How to access a non static method in an abstract class's static method?

C# Help with value change?

  • I have a database which gives the values into it but I want to be able to have two + and - buttons so that the value and be increased and decreased using them and then I can update it (which is working fine) so that the value gets saved into the access database. Does anyone know how I can get these buttons to work because they are having problems, here is the example of what : private void button1_Click(object sender, EventArgs e) { field2TextBox = double.Parse(field2TextBox.Text) + a; field2TextBox = field2TextBox.ToString; } and the errors are : 1.Cannot implicitly convery type 'double' to 'System.Windows.Forms.TextBox' 2.Cannot convert method group 'ToString' to non-delegate type 'System.Windows.Forms.TextBox'. Did you intend to invoke the method ?

  • Answer:

    You need to assign the values to the Text property of the TextBox object field2TextBox.Text = double.Parse(field2TextBox.Text) + a; field2TextBox.Text = field2TextBox.ToString(); //<- method call, you need the brackets

Owen at Yahoo! Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.