4
Answers

events

Ask a question
I have a method
 
public void mybutton_click(object sender ,eventArgs e){
 textblock.text=1;
}
public String mymethod(){
if(textlock.text==1){
return "mixture ";
}
else {
return  "fixed";
}
}
problem is when i try to return  the values from mymethod to  a timer event  I get the error
Not all code paths return a value  .
how do i resolve so as to return a value from mymethod

Answers (4)