c# and c

  • Thread starter Thread starter Martin Glaser
  • Start date Start date
M

Martin Glaser

Hi,

i'm quite new to c# but already amazed how easy and fast gui development
is. So I quite like the idea of .net. up to now i was mostly using c
and there is quite a lot of source code I want to use (without porting
it to c#).
I was looking for some help to use c and c#, but i didn't come along
with a good introduction. Does anybondy know a good page or can anybody
recommend me a good book about using unmanaged c with c#?

Thanks for any help
Martin
 
Martin Glaser said:
Hi,

i'm quite new to c# but already amazed how easy and fast gui development
is. So I quite like the idea of .net. up to now i was mostly using c and
there is quite a lot of source code I want to use (without porting it to
c#).
I was looking for some help to use c and c#, but i didn't come along with
a good introduction. Does anybondy know a good page or can anybody
recommend me a good book about using unmanaged c with c#?

There's very good news here in .NET 2.0. With C++/CLI you can build a C/C++
program where managed and unmanaged code interoperate freely. One
compilation unit can be managed code, and the next unmanaged C or C++. It
all links together and just works.


C++/CLI Language Specification Standard
http://msdn.microsoft.com/visualc/homepageheadlines/ecma/default.aspx

C++: The Most Powerful Language for .NET Framework Programming
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/VS05Cplus.asp

Hello, C++/CLI
http://msdn.microsoft.com/msdnmag/issues/05/02/PureC/

You can also compile your unmanaged C into a set of dll's and access them
from C#, but marshaling the types and interoperaing across the languages is
much harder.

David
 
David said:
There's very good news here in .NET 2.0. With C++/CLI you can build a C/C++
program where managed and unmanaged code interoperate freely. One
compilation unit can be managed code, and the next unmanaged C or C++. It
all links together and just works.


C++/CLI Language Specification Standard
http://msdn.microsoft.com/visualc/homepageheadlines/ecma/default.aspx

C++: The Most Powerful Language for .NET Framework Programming
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/VS05Cplus.asp

Hello, C++/CLI
http://msdn.microsoft.com/msdnmag/issues/05/02/PureC/

You can also compile your unmanaged C into a set of dll's and access them
from C#, but marshaling the types and interoperaing across the languages is
much harder.

David
Thanks for your answer,

that sounds quite great. I only read that you can use c++ managed and
unmanaged together. What about c#? Can you use managed c# and unmanaged
c/c++ together?
Thanks,
Martin
 
Martin Glaser said:
Thanks for your answer,

that sounds quite great. I only read that you can use c++ managed and
unmanaged together. What about c#? Can you use managed c# and unmanaged
c/c++ together?
Thanks,
Martin

In a managed C++ module you can freely interoperate with both managed and
unmanaged code. The managed code can be .NET framework stuff or your own C#
stuff.

David
 
Back
Top