Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cost for .Net
Message
 
 
À
31/01/2002 08:50:33
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Divers
Thread ID:
00609123
Message ID:
00613354
Vues:
44
>Hey Mike,
>
>hmmm...that's very interesting. Thanks for the link.
>
>For some reason I thought it was an all or nothing proposition, at least w/C++. At least Larry Miller said something to that effect recently (you were involved in the thread at one point).
>
>>>I don't think C# can run unmanaged code...C++ has the ability to do managed or unmanaged. I'll try to look into it tomorrow.
>>
>>I've never done it, but it looks possible. message#613147

Steve,
I don't think it's quite the same. From the VS.Net Help on unsafe:

While practically every pointer type construct in C or C++ has a reference type counterpart in C#, there are nonetheless situations where access to pointer types becomes a necessity. For example, interfacing with the underlying operating system, accessing a memory-mapped device, or implementing a time-critical algorithm may not be possible or practical without access to pointers. To address this need, C# provides the ability to write unsafe code.

In unsafe code it is possible to declare and operate on pointers, to perform conversions between pointers and integral types, to take the address of variables, and so forth. In a sense, writing unsafe code is much like writing C code within a C# program.


Code created with C# is still run using the CLR. The CLR gives you some capabilities to handle pointers using the unsafe keyword in its C# modules because MS felt that was required under certain conditions (see above).

What I was referring to in the previous thread was that when you create a C++ project in VS.Net, you have the ability to set a compiler option to either use Managed Extensions (CLR) or not. If you choose not to, you will create a normal VC++ application that requires the VC++ run-time files (e.g. Visual FoxPro) to run.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform