How can I inject this code into the method Test()?
this.DialogResult = DialogResult.OK;
So the method after injecting will look like this:
public void Test()
{
this.DialogResult = DialogResult.OK;
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That will insert the assignment at the top of the Test method, provided that the field DialogResult is declared in the same type declaring Test (otherwise you’ll have to browse its hierarchy to retrieve it):