473,695 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to user abstract class in EXE and DLL without get

I have an EXE and DLL in the same solution. Each one uses the same abstract
class in their respective code. How can I set up the build so that I don't
get the
"X is defined in multiple places" warning message.
Dec 13 '05 #1
2 1057
First, you should define the Type in one place olny if you have the exact
same behavior.
If behavior is different but the names are same then just change namespace
of both the Type and then you can easily refer the Type by namespace and
type name.


"scottt" <sc****@discuss ions.microsoft. com> wrote in message
news:00******** *************** ***********@mic rosoft.com...
I have an EXE and DLL in the same solution. Each one uses the same abstract class in their respective code. How can I set up the build so that I don't
get the
"X is defined in multiple places" warning message.

Dec 13 '05 #2

As I told you before, you have to factor this out into another dll and
then reference it in both the exe and the dll.
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"scottt" <sc****@discuss ions.microsoft. com> wrote in message
news:00******** *************** ***********@mic rosoft.com...
I have an EXE and DLL in the same solution. Each one uses the same abstract
class in their respective code. How can I set up the build so that I don't
get the
"X is defined in multiple places" warning message.

Dec 13 '05 #3

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

Similar topics

by: f00sion | last post by:
I found a good tutorial of how to supply the objects without having the implementation files on the client. This was working great until I realized that I couldnt use any constructors with server activated objects, so I switched to client activated objects only to run into the next roadblock, doh! can't instantiate abstract classes... here is a simple example of the structure, im sure there is a way to do it to allow instantiation but I am...
by: Dan Sikorsky | last post by:
If we were to define all abstract methods in an abstract class, thereby making that class non-abstract, and then override the heretofore 'abstract' methods in a derived class, wouldn't that remove the need to have abstract class types in C#? Derived classes from abstract base classes must overrided the abstract method defininition anyway, so why not just provide a complete definition for the abstract method when defining the containing...
by: phl | last post by:
hi, I am kind of confused aobut interfaces and abstract classes. In short as I understand it, an interface is like a contract between the class and the interface, so that certain funtions must be implemented. So if you have a class which inherits base class that inherts an interface, then your classes will have a standard. I suppose you can also check for interface at run time say when dll is loaded and see if it implememts whats...
by: Byron | last post by:
I have several user controls that have a few methods in common, such LoadFromForm() which populates an object from controls on the form. I want to call that method from the form in which the control is contained regardless of the type currently displayed without having to use a huge switch somthing like: switch(curentUserType.GetType()) { case "Person": ((person)currentUserControl).LoadFromForm();
by: Samuel | last post by:
Hi, I am building a page that makes use of user control as a templating technique. The following is that I have in mind and it is actually working: Root/ -- login.aspx -- login.aspx.vb -- UC/ ----- Classic/
by: Sean Kirkpatrick | last post by:
To my eye, there doesn't seem to be a whole lot of difference between the two of them from a functional point of view. Can someone give me a good explanation of why one vs the other? Sean
by: D Witherspoon | last post by:
Coming up with a scenario here. For example there is the standard .NET MailMessage class. I am creating a project (let's call it CommonBase) that has the following 2 classes EmailMessage_Base ( inherits System.Net.Mail.MailMessage and provides additional methods and properties) EmailMessage_Abstract ( inherits EmailMessage_Base and adds some business logic including what default return addresses are and
by: mark.norgate | last post by:
I've run into a few problems trying to use generics for user controls (classes derived from UserControl). I'm using the Web Application model rather than the Web Site model. The first problem I'm having is that the partial class signature in my projectDetails.ascx.cs file looks like this: public partial class ProjectDetailsControl<TEntryServiceProvider: UserControl, INamingContainer where TEntryServiceProvider : IEntryServiceProvider...
by: emin.shopper | last post by:
I had a need recently to check if my subclasses properly implemented the desired interface and wished that I could use something like an abstract base class in python. After reading up on metaclass magic, I wrote the following module. It is mainly useful as a light weight tool to help programmers catch mistakes at definition time (e.g., forgetting to implement a method required by the given interface). This is handy when unit tests or...
by: Miguel Guedes | last post by:
Hello, I recently read an interview with Bjarne Stroustrup in which he says that pure abstract classes should *not* contain any data. However, I have found that at times situations are when it would be useful to have /some/ data defined in such an abstract class for reasons of forming a common block of data existing in or used by all descendant classes (see example below.) In such a case where a common block of data *always* exists,...
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.