Directives
1.1 Never hard-code application-specific or component-specific values in object templates.
Object templates should be made as generic as possible. Because you can rarely know in advance the project in which the objects might end up, you have to design your objects accordingly. There are essentially three mechanisms you can use to ensure that the data used and displayed by a template object is the proper data for the project in which the object resides. You can
Reference the Assembly object of the .NET Framework to obtain application-specific data, such as calling System.Reflection.Assembly.GetExecutingAssembly.Location to obtain the path and filename of the application.
Provide functions and properties that the host project can ...
Get Practical Standards for Microsoft® Visual Basic® .NET, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.