I have one combobox on the window form and I have one method which is declared with static like private static DataTable ParseTable(HtmlNode table) Now I want to use combobox in that method for using combobox property but I can not access any property of combobox or combobox itself.If I made the combobox declaration as static then it can be accessed in that static method.But any alternative way to access combbox property in that static method because I don’t want to make combobox declaration as static.
I have one combobox on the window form and I have one method which
Share
You can pass combobox as a parameter to your method. Why do you need to have
ParseTablemethod as static?Update: You cannot access non-static members of a class in static context. So the only thing you can do if you still need having a static method is somehow passing your combobox to that method using method’s parameters.