Hi I have a webbrowser on my form and having problem with getting its values. I followed the page Question about How to loop through all the properties of a class
VB.NET Code:
Type type = Browser_Wb.GetType(); PropertyInfo[] properties = type.GetProperties(); foreach (PropertyInfo property in properties) { Console.WriteLine("Name: " + property.Name + ", Value: " + property.GetValue(Browser_Wb)); }
And
VB.NET Code:
Type type = Browser_Wb.GetType(); BindingFlags flags = BindingFlags.Public | BindingFlags.Instance; PropertyInfo[] properties = type.GetProperties(flags); foreach (PropertyInfo property in properties) { Console.WriteLine("Name: " + property.Name + ", Value: " + property.GetValue(Browser_Wb, null)); }
I got error: System.ArgumentException: 'Property Get method was not found.'




Reply With Quote
