Groups | Blog | Home
all groups > vb.net > february 2007 >

vb.net : Altering interface



Thomas Schoch
2/21/2007 10:49:44 PM
I have written an interface IAddin for addins for my application. Now
I have to add a new property to this addin.
What is the best way to do this? I don't want to rewrite or recompile
the existing addins because they are already installded on some client
machines.

My idea: Create a new interface IAddin2 which inherits from IAddin and
add the new property. In the host application I can test wheter an
addin support interface IAddin or IAddin2 and if it support IAddin2
set the new property.
Is this the way to go?

tosch
Phill W.
2/23/2007 12:00:00 AM
[quoted text, click to view]

So long as you're only adding new stuff, this sounds like the way to go.

As soon as you start wanting to remove stuff - panic! :-)

HTH,
Tom Shelton
2/23/2007 5:26:43 PM
[quoted text, click to view]

What you suggest is the common solution (and the suggested naming). If you
need to remove stuff, then you need to create a whole new interface.

--
AddThis Social Bookmark Button