best way to create an interface for multiple assemblies

i want to create an interface to share between some classes.
i have an assembly that references 6 other assemblies. in each assembly there may or may not have a class that implements this interface. should i just create a new project with just the interface, build it, and have those assemblies that need to implement the interface, reference it. or is there a better approach


Answer this question

best way to create an interface for multiple assemblies

  • Terence Curd

    i basically have multiple assemblies that contain multiple classes. i have 1 main assembly that will reference the multiple assemblies above. some of these classes, i want to implement an interface. im just wondering is if i should just create a new project, declare the interface in there, compile it, and then have all of these assemblies that need the interface to reference it, thus having multiple references to the interface in the main assembly or is there a better approach.
  • RandomLick

    Hi,

    I am not much clear about the question, can you please elaborate it a bit to explain what exactly you want to do using interface

    If possible try to post some code that can explain it!

    Regards,



  • Syed Imam

    I ussually refactor commonalities (like your interface) in an assembly (and namespace) named something like MyAssembly.Common, and reference this assembly where needed.


  • best way to create an interface for multiple assemblies