[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.interop

Is there not an easier way to latebind in C#?

Mark Howell

6/12/2007 12:46:00 AM

Rather than p/Invoke, is there not an easier way to Interop to Office
products in C# such that I don't have to worry about what version the user
is running? In VB it's merely using late binding (Createobject, etc). I
don't want to include a reference to VB in my C# program and p/Invoke
(GetType.Invoke, etc) is a pain in the ###. Can anyone suggest an easier
way?


1 Answer

Phil Wilson

6/12/2007 2:43:00 PM

0

C# does late binding. There's an example towards the end of this article
that sends mail using Outlook and late binding.
http://www.simple-talk.com/dotnet/visual-studio/build-and-deploy-a-.net-com...
--
Phil Wilson
[Microsoft MVP-Windows Installer]

"Mark Howell" <Mark.Howell@Microsoft.com> wrote in message
news:%239E46rIrHHA.4200@TK2MSFTNGP05.phx.gbl...
> Rather than p/Invoke, is there not an easier way to Interop to Office
> products in C# such that I don't have to worry about what version the user
> is running? In VB it's merely using late binding (Createobject, etc). I
> don't want to include a reference to VB in my C# program and p/Invoke
> (GetType.Invoke, etc) is a pain in the ###. Can anyone suggest an easier
> way?
>