December 2003
Intermediate to advanced
504 pages
10h 42m
English
The objective of this section is to illustrate that .NET really supports cross-programming language use. You will learn how classes defined in one programming language can be subclassed in another and utilized in yet another. First, define the Base class in C#.
using System;
namespace mixed
{
public class Base
{
public Base()
{
}
public virtual String GetLanguage()
{
return "C#";
}
}
}
This program is compiled into a library using the C# compiler.
csc /t:library CSharp.cs
Next, a Visual Basic .NET class is declared as a subclass of the Base class.
Imports System Namespace mixed Public class Derived Inherits Base Public Sub New() End Sub Public Overrides Function GetLanguage() As String ...
Read now
Unlock full access