Click here to Skip to main content
Click here to Skip to main content

Understanding Classic COM Interoperability With .NET Applications

By , 24 Jul 2001
 
cominteropwithdotnetdemo.zip
COMInteropWithDOTNET
COMInteropWithDOTNETDemo
AirlineClient.exe
AirlineInformation.dll
AirlineMetadata.dll
AirlineNotify.exe
AirlineNotifyClient.exe
AirlineNotifyMetadata.dll
ControlTower.exe
DelegateTest.exe
Directional.dll
FlightClient.exe
HelloDotNet.dll
HelloWorldDelegate.exe
IceCreamMenuClient.exe
IceCreamMenuMetadata.dll
IceCreamParlor.dll
MyFlyer.dll
MyFlyerMetadata.dll
NETThreadDemoClient.exe
SevenDwarfs.exe
Temperature.dll
VBIceCreamProject.dll
VBTestClient.exe
VBWeatherStation.exe
WeatherNotify.dll
cominteropwithdotnetsource.zip
COMInteropWithDOTNETSource
ClassicCOM
AirlineInformation
AirlineInfo.rgs
AirlineInformation.aps
AirlineInformation.def
AirlineInformation.dsp
AirlineInformation.dsw
AirlineInformation.opt
AirlineInformation.tlb
AirlineInformationps.def
AirlineInformationps.mk
AirlineNotify
AirlineArrivalPager.rgs
AirlineNotify.aps
AirlineNotify.dsp
AirlineNotify.dsw
AirlineNotify.opt
AirlineNotify.rgs
AirlineNotify.suo
AirlineNotify.tlb
AirlineNotifyps.def
AirlineNotifyps.mk
IceCreamParlor
IceCreamMenu.rgs
IceCreamParlor.aps
IceCreamParlor.def
IceCreamParlor.dsp
IceCreamParlor.dsw
IceCreamParlor.opt
IceCreamParlor.tlb
IceCreamParlorps.def
IceCreamParlorps.mk
MyFlyer
Flyer.rgs
MyFlyer.aps
MyFlyer.def
MyFlyer.dsp
MyFlyer.dsw
MyFlyer.opt
MyFlyer.tlb
MyFlyerps.def
MyFlyerps.mk
NETThreadDemoClient
HelloDotNet.tlb
NETThreadDemoClient.dsp
NETThreadDemoClient.dsw
NETThreadDemoClient.opt
VBAirlineControlTower
ControlTower.vbp
ControlTower.vbw
MainForm.frm
VBIceCreamParlor
IceCreamMenu.cls
stdole.dll
VBIceCreamProject.exp
VBIceCreamProject.lib
VBIceCreamProject.vbp
VBIceCreamProject.vbw
VBTestClient
FormMain.frm
VBTestClient.vbp
VBTestClient.vbw
VBWeatherStation
VBWeatherStation.vbp
VBWeatherStation.vbw
VBWeatherStationForm.frm
DOTNET-CSharpFiles
AirlineInformation.tlb
AirlineNotify.tlb
IceCreamParlor.tlb
MyFlyer.tlb
MyKeyPair.snk
cominterop_demo.zip
ComInteropDemo
AirlineCSharpClient
AirlineInformation
AirlineInfo.rgs
AirlineInformation.aps
AirlineInformation.def
AirlineInformation.dsp
AirlineInformation.dsw
AirlineInformation.opt
AirlineInformation.tlb
AirlineInformationps.def
AirlineInformationps.mk
using System;

delegate string SayGoodMorning();

public class HelloWorld
{

   public string SpeakEnglish() {
	return "Good Morning";
   }

   public string SpeakFrench() {
        return "Bonjour";
   }

   public static void Main(String[] args) {

	HelloWorld obj = new HelloWorld();

	// Associate the delegate with a method reference
	SayGoodMorning english = new SayGoodMorning(obj.SpeakEnglish);
	SayGoodMorning french = new SayGoodMorning(obj.SpeakFrench);

	// Prints the following :
	// Good Morning
              // Bonjour
	System.Console.WriteLine(english());
	System.Console.WriteLine(french());

  }/* end Main */


}/* end class */

By viewing downloads associated with this article you agree to the Terms of use and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Aravind C
India India
Member
No Biography provided

Permalink | Advertise | Privacy | Mobile
Web03 | 2.6.130516.1 | Last Updated 25 Jul 2001
Article Copyright 2001 by Aravind C
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid