HighTechTalks DotNet Forums  

Serviced Component & inheritance

Dotnet Framework (Component Services) microsoft.public.dotnet.framework.component_services


Discuss Serviced Component & inheritance in the Dotnet Framework (Component Services) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Nikhil Sarathi via .NET 247
 
Posts: n/a

Default Serviced Component & inheritance - 06-05-2004 , 03:23 PM






I have a C# component which has two classes, one is a base classclass & the other is the child, I want to add this component toCOM+, I know I need to inherit the ServicedComponent class, butwhere should I do it in the base class or the child class. Alsohow can I do it in the child class as its already inheriting thebase class. ANy help is appreciated.

Thanks,

--------------------------------
From: Nikhil Sarathi

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>RtjsyiH1h0+vU8gHpoLNlg==</Id>

Reply With Quote
  #2  
Old   
José Miguel Torres
 
Posts: n/a

Default Re: Serviced Component & inheritance - 06-07-2004 , 05:33 AM






You must inherit your child class from ServicedComponent. Try it.


public class childClass : baseClass, ServicedComponent
{
}

regards


--
José Miguel Torres
jtorres_diaz~~ARROBA~~terra.es
"Nikhil Sarathi via .NET 247" <anonymous (AT) dotnet247 (DOT) com> escribió en el
mensaje news:uPWYeKzSEHA.2504 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
I have a C# component which has two classes, one is a base class class & the
other is the child, I want to add this component to COM+, I know I need to
inherit the ServicedComponent class, but where should I do it in the base
class or the child class. Also how can I do it in the child class as its
already inheriting the base class. ANy help is appreciated.

Thanks,

--------------------------------
From: Nikhil Sarathi

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>RtjsyiH1h0+vU8gHpoLNlg==</Id>



Reply With Quote
  #3  
Old   
hUgO
 
Posts: n/a

Default Re: Serviced Component & inheritance - 07-17-2004 , 05:07 PM



Dear Jose Miguel Torres,

In C# you can not inherit from two class !! Instead, you can implement many
interfaces and inherit only one class!

But you can inherit the baseClass from ServicedComponent and the child
directly from baseClass and this must work.

Regards

Román


"José Miguel Torres" <jtorres_diaz~~ARROBA~~terra.es> escribió en el mensaje
news:OKOCcKHTEHA.3332 (AT) tk2msftngp13 (DOT) phx.gbl...
Quote:
You must inherit your child class from ServicedComponent. Try it.


public class childClass : baseClass, ServicedComponent
{
}

regards


--
José Miguel Torres
jtorres_diaz~~ARROBA~~terra.es
"Nikhil Sarathi via .NET 247" <anonymous (AT) dotnet247 (DOT) com> escribió en el
mensaje news:uPWYeKzSEHA.2504 (AT) TK2MSFTNGP09 (DOT) phx.gbl...
I have a C# component which has two classes, one is a base class class &
the
other is the child, I want to add this component to COM+, I know I need to
inherit the ServicedComponent class, but where should I do it in the base
class or the child class. Also how can I do it in the child class as its
already inheriting the base class. ANy help is appreciated.

Thanks,

--------------------------------
From: Nikhil Sarathi

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

Id>RtjsyiH1h0+vU8gHpoLNlg==</Id





Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.