C#- using a variable in an 'enclosing' local scope?
问题 I am trying to add some new features to a C# application- in particular, trying to replicate some of its behavior, but inside a web browser, rather than in the application, as it currently is. I am trying to call a method that has been defined in the Browser.cs class from inside a method in the MainWindow.cs class. The method is defined in Browser.cs with: public partial class Browser : Form{ public Browser(){ ... } public void Browser_Load(object sender, EventArgs e){ webKitBrowser1.Navigate