How to get the object description using reflection. I can get the name, value, etc… but not the description like in .net.
For example the description for .Text is “Gets or sets the text associated with this control.”
I thought maybe using MethodInfo, but does not give the description.
Dim MethodObj As MethodInfo
Console.WriteLine("Methods:")
For Each MethodObj In GetType(TextBox).GetMethods()
Debug.Print(MethodObj.Name & " " & MethodObj.ReturnType.ToString())
Next
You can’t get this description via reflection, because it is not compiled into the assembly. During compilation an XML documentation file is generated that contains this description. You need to parse this XML file to get the description. However, you don’t always have this file, because it is not required to execute the assembly.