473,320 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

C# Implementing Interface AND Inheriting MarshalByRefObject

Have a problem/Question - I have created a C# class that
inherits from MarshalByRefObject as well as implements a
custom Interface that I have created.

The thing that is not working is that when I try to use
this class in a different assembly I cannot reference it
even when using it's namespace qualifier. It has been
refereced in my project. I even put the namespace in the
Imports/using statements in the top of the class file
(I've tried with both a vb client and cs client).

When using the VB client, I try to dimension a variable
with the following code:

Dim objInvoice as NECAFormProcessing.Invoice

(NECAFormProcessing is my namespace and Invoice is the
class name)

I get the following error:

Reference required to assembly 'NECAWorkerObjects'
containing the implemented
interface 'NECAFormProcessing.IOnlineForm'. Add one to
your project.

The assembly NECAWorkerObjects is where the interface
definition is found for the interface that the Invoice
class implements (IOnlineForm). Yes...the
NECAWorkerObjects assembly is referenced in my project.

Any quick thoughts?!?!
Nov 22 '05 #1
3 5619
Maybe you're referencing the wrong version? Try doing a clean build. if the
interface is there the compiler should be able to see it.
--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/

"Paul" <******************@everestkc.net**> wrote in message
news:01****************************@phx.gbl...
Have a problem/Question - I have created a C# class that
inherits from MarshalByRefObject as well as implements a
custom Interface that I have created.

The thing that is not working is that when I try to use
this class in a different assembly I cannot reference it
even when using it's namespace qualifier. It has been
refereced in my project. I even put the namespace in the
Imports/using statements in the top of the class file
(I've tried with both a vb client and cs client).

When using the VB client, I try to dimension a variable
with the following code:

Dim objInvoice as NECAFormProcessing.Invoice

(NECAFormProcessing is my namespace and Invoice is the
class name)

I get the following error:

Reference required to assembly 'NECAWorkerObjects'
containing the implemented
interface 'NECAFormProcessing.IOnlineForm'. Add one to
your project.

The assembly NECAWorkerObjects is where the interface
definition is found for the interface that the Invoice
class implements (IOnlineForm). Yes...the
NECAWorkerObjects assembly is referenced in my project.

Any quick thoughts?!?!

Nov 22 '05 #2
Thanks...I've tried to clarify the question better and created a new thread above.

The thread is called "C# Class not implementing VB.NET Interface"

I've put some example code of a small app that I was able to re-produce the problem with.

Thanks again for the response.
Nov 22 '05 #3
Thanks...I've tried to clarify the question better and created a new thread above.

The thread is called "C# Class not implementing VB.NET Interface"

I've put some example code of a small app that I was able to re-produce the problem with.

Thanks again for the response.
Nov 22 '05 #4

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

Similar topics

2
by: Paul | last post by:
Have a problem/Question - I have created a C# class that inherits from MarshalByRefObject as well as implements a custom Interface that I have created. The thing that is not working is that when...
6
by: Martyn Lawson | last post by:
Hi, I am currently working as an Analyst on a .NET Web Project using ASP.NET and C#.NET. I have a couple of, at least what should be, quick questions: 1. My understanding of UML says that...
2
by: Marius Horak | last post by:
Cannot see any good reason for using it (just duplication of code.). Can you? MH
4
by: Frank J. Reashore | last post by:
Hello Everyone, I am implementing a simple interface in C# using Visual Studio .net and was quite surprised to discover that the C# compiler does NOT complain if a method on the interface is not...
18
by: Bradley | last post by:
I'm trying to determine if there's a general rule for when an Interface should used vs. an Abstract Class. Is there any design advantage to using one or the other? Brad
0
by: z. f. | last post by:
Hi, I'm not so familiar with control inheriting, but what i need is very simple (should be) and requires only deep knowledge with implementing control inheritence. is it possible (might someone...
1
by: Todd Beaulieu | last post by:
I need to return a reference of a server-side object to the client. I want that class to implement a custom interface (there will be a number of classes involved here and they will all support the...
4
by: Dan Holmes | last post by:
I am in a jam. Since C# (or the CLR) doesn't support MI i need to create either two inheritance hierarchies or have all my object inherit ultimately from MarshalByRefObject. I noticed that...
6
by: Raj Wall | last post by:
Hi, I am trying to implement the IEqualityComparer interface for a struct so I can use it as the Key for a Dictionary. My struct declaration has: public struct Ring : IEqualityComparer {...
7
by: tshad | last post by:
I am trying to understand Interfaces and why I would use them. I have an example from a book that is explaining it. I just can't seem to see why I would use it. In my example, it has 2...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.