[dba-VB] Wrapper classes

jwcolby jwcolby at colbyconsulting.com
Thu Dec 16 10:26:19 CST 2010


Before I get too far down this road, I need to know whether a strategy I use is viable or there is a 
better way to do this.

I have a strategy that I developed back in VBA where I wrap a set of controls required to do 
something along with the logic to do that something into a class.  I sink any events for the 
controls in that class and raise events as required from that class.  For example I just created a 
clsGetFile.  In the constructor I pass in a button and a text box.  The text box displays the folder 
that is selected and has a default "starting path".  The button creates an OpenFileDialog and allows 
the user to navigate to and select a file.  The class has properties pInitialPath and pFileSpec;

I place this class in a ProjBaseObjects and reference that project from anywhere that I need to do a 
filefind.

I have just started using this wrapper class paradigm in C# and just wanted to check with our more 
experienced .Net developers that this strategy is appropriate in .Net.

Thanks,
-- 
John W. Colby
www.ColbyConsulting.com



More information about the dba-VB mailing list