473,545 Members | 2,715 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

can an interface reside in an assembly other than one whose members it is describing?

If I have two assemblies in a VSNET project and create an interface, does
the interface have to reside in the assembly whose class methods it
describes?
How do I reference interfaces in the project?
Are there any good articles that describe interfaces from a good
functional/operational/Visual Studio .NET point of view?

I am working on a multi-project solution whose references are a combination
of project references and file references. Throw in a circular reference
with the need to create late bound objects, and it makes for an interesting
challenge.

appreciatively,
hazz
Nov 16 '05 #1
2 1255
If possible move the interface into a seperate project. In the projects that
implement the interface, add a project reference to the interface project.

--
Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph
"Hazzard" <ha**@sonic.net > wrote in message
news:%2******** *******@tk2msft ngp13.phx.gbl.. .
If I have two assemblies in a VSNET project and create an interface, does
the interface have to reside in the assembly whose class methods it
describes?
How do I reference interfaces in the project?
Are there any good articles that describe interfaces from a good
functional/operational/Visual Studio .NET point of view?

I am working on a multi-project solution whose references are a combination of project references and file references. Throw in a circular reference
with the need to create late bound objects, and it makes for an interesting challenge.

appreciatively,
hazz

Nov 16 '05 #2
Thank you Sijin.
So the linking process at build time will locate the interface because it
has been referenced and resolve the contract between the interface and the
class that implements the interface.
What is the reason for moving the interface into a separate project? I am
guessing it has something to do with not being bound to the
component/assembly which it is describing?
Thanks again!
-Greg

"Sijin Joseph" <si*********@ho tmail.com> wrote in message
news:OI******** *****@TK2MSFTNG P09.phx.gbl...
If possible move the interface into a seperate project. In the projects that implement the interface, add a project reference to the interface project.

--
Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph
"Hazzard" <ha**@sonic.net > wrote in message
news:%2******** *******@tk2msft ngp13.phx.gbl.. .
If I have two assemblies in a VSNET project and create an interface, does the interface have to reside in the assembly whose class methods it
describes?
How do I reference interfaces in the project?
Are there any good articles that describe interfaces from a good
functional/operational/Visual Studio .NET point of view?

I am working on a multi-project solution whose references are a

combination
of project references and file references. Throw in a circular reference
with the need to create late bound objects, and it makes for an

interesting
challenge.

appreciatively,
hazz


Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

220
18829
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have any preconceived ideas about it. I have noticed, however, that every programmer I talk to who's aware of Python is also talking about Ruby. So it...
6
11988
by: Sgt. Sausage | last post by:
I know it's not possible, but I need a protected internal interface: protected internal interface ISomeInterface{ // yadda yadda yadda } Basically, I need an interface that is completely accessable from within the assembly (internal), but is not valid outside
21
13793
by: Helge Jensen | last post by:
I've got some data that has Set structure, that is membership, insert and delete is fast (O(1), hashing). I can't find a System.Collections interface that matches the operations naturally offered by Sets. - ICollection cannot decide containment - IList promises indexability by the natural numbers, which is not achievable (since i hash...
1
1301
by: ChrisA | last post by:
I have an asm that implements an interface. Since the asm will be loaded dynamically, where should the interface be defined so that the client and implementation can both use it? It seems like over-kill to define a shared asm that just contains the interface definition. If the inteface is defined in a shared project file, can there be a...
2
3227
by: mats | last post by:
Hi! This is a quite involved question concerning two dll's that are consumed from a console application. The first dll is called base.dll and is compiled in mixed mode (managed and unmanaged C++). One native class and one managed interface is declared and defined in base dll. The native class is exported via declspec(dllexport) and the...
4
1071
by: Sohum | last post by:
Hi I'm reasonably new to this group, and to programming in general. I'd like to know, can you selectively scope within an interface? For example: Public Interface MyInterface Friend Property X as MyX
5
1273
by: Ben Voigt | last post by:
Getting a C1001 internal error off the following code: I've found an alternate means of making the Node property accessible in the parent class only using a public interface, private implementation class, and static_cast to downcast, but now I'm stuck wondering how to prevent any other class from being derived from that interface! Still...
52
20830
by: Ben Voigt [C++ MVP] | last post by:
I get C:\Programming\LTM\devtools\UselessJunkForDissassembly\Class1.cs(360,27): error CS0535: 'UselessJunkForDissassembly.InvocableInternals' does not implement interface member 'UselessJunkForDissassembly.IInvocableInternals.OperationValidate(string)' C:\Programming\LTM\devtools\UselessJunkForDissassembly\Class1.cs(360,27): error CS0535:...
7
10581
by: WTH | last post by:
I am now aware (I am primarily a C++ developer) that in C# if you reference the same interface from the same file in two different projects the types are actually incompatible. I found this out because I have written a generic plugin system for my current and future C# needs. I defined a base plugin system interface named IPlugin...
0
7499
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7432
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7689
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7456
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7786
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6022
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5359
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1919
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.