I swear I read about this at some point in time but haven't had a great use for it until now and I can't seem to find anything on it anymore.
I want to re-use a SaveFileDialog and an OpenFileDialog. The initialization properties for both classes are nearly identical. Is there a way to create a class or a structure or other that could be used to fill the properties?
Public Struct FileDialog
Filter = "XML Files (*.xml)|*.xml"
DefaultExt = "XML"
InitialDirectory = "c:\"
Dim SaveFileDialog1 as new SaveFileDialog
Dim OpenFileDialog1 as new OpenFileDialog
SaveFileDialog.Properties = FileDialog 'I just made that up =)
OpenFileDialog.Properties = FileDialog 'The ability to re-use for different objects and to have multiple pre-sets for a single object