c# - can't use textbox outside MainWindow method -


I am trying to create an integer which contains numbers in box 1 (in wpf). But the compiler will not allow me to compile my code. Am I wrong?

  public partial square main window: window {public main window} {starting object (); } Private intakes () {int var1 = int.Parse (box1.Text); }}  

has the error:

wpfapplication1.mainwindow.addValues ​​do not return all code paths a value

  private int addValues ​​() {int var1 = int pars (box1.Text); Return var1; }  

Its a non-sensible, returning method but there is no value.

Make it sensible as such,

  private zeros addValues ​​() {int var1 = int.Parse (box1.Text); }  

Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -