In the following examples, I will be using a simple ASP.NET page with code-behind (because in code-behind the class is clearly defined for you).
GetType returns a Type class with information about a particular type. Examine the following code -
|Public Class WebForm3|
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim mtype As System.Type = GetType(WebForm3)
mtype now contains information about WebForm3. And if it were to do something like -
Dim member As System.Reflection.MemberInfo
For Each member In mtype.GetMembers
You will get a table of every single member in the Type. See the live demo.
I probably jumped ahead a bit with the GetMembers call, but all you need to know about it is that it returns an array of MemberInfo objects that contain information about every member in the type. If you take a look at the demo, you will see a lot of methods and properties that you didn't know existed. This is because it not only takes WebForm3, but also -
Because that is how far back the inheritance goes on WebForm3.