The following function will return a list of all subclasses inherited from a given class. Please note, that it works only within a single assembly, same as which holds the given superclass. 1 2 3 4 5 6 7 8 Function FindSubClasses(Of TBaseType)() As IEnumerable(Of Type) Dim baseType = GetType(TBaseType) Dim […]
Continue reading…
Dynamic Programming
How to create an object by class name using Reflection
1. When the class is defined in the same assembly, where your code is executed: 1 2 3 4 Dim _assemblyName As String = "MyAssembly" Dim _typeName As String = "MyNamespace.ExampleControl" Dim _type As Type = Assembly.Load(_assemblyName).GetType(_typeName, True) _control = Activator.CreateInstance(_type) Dim _assemblyName As String = “MyAssembly” Dim _typeName As String = “MyNamespace.ExampleControl” Dim _type […]
Continue reading…
How to dynamically generate SSRS Report
SSRS is a wonderful tool for quickly retrieving data and presenting it to the user in a format predefined at design-time. But what if there is a need to create a new report at run-time, based on some dynamic data structure or any specific user needs? Of course, for advanced business users Microsoft Report Builder […]
Continue reading…