Outline
All .net assemblies have ‘METADATA' information stored about the type defined in
MODULES. This metadata information can be accessed by a mechanism called as
‘REFLECTION'.
Introduction
Reflection is used when you don't know at compile time which time your object is
or what action to do or on what property. REFLECTION provides several
functionalities to assembly ‘METADATA'. Through using reflection you can also
dynamically invoke methods. For invoking methods you need to add a namespace, as
given below-
System.Type.Invokemember //invoking method //
You can dynamically invoke methods, on basis of that example:
Ex
Public Class Ref
Private Sub Ref_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Pobjtype As Type
Dim PobjObject As Object
Dim objButtons As New Windows.Forms.Button()
Pobjtype = PobjButtons.Get Type ()


Join the conversation! Your thoughts help the community grow.