473,325 Members | 2,442 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,325 software developers and data experts.

VB.Net inheriting from C# Class

We are integrating some of our software with another company's software.

They use C#, we use VB.Net. We need to inherit from one of their objects in
order to change one of the methods so that it uses some of our code.

Should this be possible ? If so does anyone know of any examples etc ?

TIA

Steve
Nov 20 '05 #1
3 3119
Yeah its possible. It has to be in its own project (or if your using a dll
then it doesn't matter... basically the C# stuff is in its on dll and your
vb.net stuff is in its own dll/executable/assembly whatever you want to call
it).

It works just the same as any type of inheritance. Your not inheriting
code, just functionality.

So.. an example.

add a reference to your C# dll...we'll call it
myCSharpProjectFromAnotherCompany

Public Class myInheritedVBClass
Inherits myCSharpProjectFromAnotherCompany.ProjectClass

....

End Class

Thats about it...

-CJ

"Steve W" <ls*@btconnect.com.no_spam> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
We are integrating some of our software with another company's software.

They use C#, we use VB.Net. We need to inherit from one of their objects in order to change one of the methods so that it uses some of our code.

Should this be possible ? If so does anyone know of any examples etc ?

TIA

Steve

Nov 20 '05 #2
Steve W wrote:
We are integrating some of our software with another company's
software.

They use C#, we use VB.Net. We need to inherit from one of their
objects in order to change one of the methods so that it uses some of
our code.

Should this be possible ? If so does anyone know of any examples etc
?

TIA

Steve


Just compile the C# class into a DLL, then reference the DLL in your VB.NET
project, then you should be able to treat the C# class as any VB.NET class.

- Pete
Nov 20 '05 #3
* "Steve W" <ls*@btconnect.com.no_spam> scripsit:
We are integrating some of our software with another company's software.

They use C#, we use VB.Net. We need to inherit from one of their objects in
order to change one of the methods so that it uses some of our code.

Should this be possible ? If so does anyone know of any examples etc ?


\\\
Public Class Foo
Inherits ClassLibrary1.TheCSharpClass

Nov 20 '05 #4

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

Similar topics

3
by: thechaosengine | last post by:
Hi all, I wanted to put some common security functions into a class that inherits from the Page class and then use the new class as the basis for all my pages. Unfortunately, if I try and...
15
by: JustSomeGuy | last post by:
this doesn't want to compile.... class image : public std::list<element> { element getElement(key k) const { image::iterator iter; for (iter=begin(); iter != end(); ++iter) { element...
29
by: shaun roe | last post by:
I want something which is very like a bitset<64> but with a couple of extra functions: set/get the two 32 bit words, and conversion to unsigned long long. I can do this easily by inheriting from...
2
by: Peter Bates | last post by:
Hi, I'm just getting used to XSDObjectGen and i have the following question. Can i use a class inherited from a class generated by XSDObjectGen with XmlSerialize? Specifically, I have many...
11
by: Noah Coad [MVP .NET/C#] | last post by:
How do you make a member of a class mandatory to override with a _new_ definition? For example, when inheriting from System.Collections.CollectionBase, you are required to implement certain...
2
by: Simon | last post by:
Hi, Just to get started.... I've created a very simple web form, "Simple", using VS and I dropped a HTML img control on the design view. I referenced a picture and it is displayed in browser...
2
by: Shayne H | last post by:
I wanted to create a type-safe collection by inheriting from CollectionBase. Public Class MyCollection : Inherits CollectionBase I found that IList.Add did not allow the setting of a "key" to...
3
by: Roy Soltoff | last post by:
Two books, "Mastering Visual Basic.Net" and "Visual Basic.Net Developer's Handbook" describe inheriting from System.EventArgs using a class similar to: Public Class MyEventArgs Inherits...
24
by: toton | last post by:
Hi, I want to have a vector like class with some additional functionality (cosmetic one). So can I inherit a vector class to add the addition function like, CorresVector : public...
17
by: Adrian Hawryluk | last post by:
Hi all, What is everyone's opinion of const inheriting? Should the object that a pointer is pointing at inherit the constness of the pointer? Such as in the case of a class having a pointer...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.