tags:

views:

231

answers:

6

I am trying to figure out if there is anything that you can do in c++ that you absolutely cannot do in c#?

I know that there are platforms that are targeted to native libraries, but I want to know if the lowest level c# can compare with the lowest level c++.

A: 

Write Real Mode code.

Ignacio Vazquez-Abrams
+12  A: 

Device drivers. These applications operate in kernel mode, and .NET apps don't (they run in user mode). Even if you could, would you really want to? Probably not considering the overhead of the runtime and the relative difficulty of interfacing directly to hardware devices.

In software you can pretty much do anything given enough time and effort. It comes down to whether or not a certain task is practical rather than possible.

Ed Swangren
+1 for practical vs. possible.
Dan
+2  A: 

inline assembler

there are some very complex win32 signatures that cannot be used via p/invoke; the sspi security interfaces for example

pm100
+1  A: 

You can't use multiple inheritance in C# (Excluding interfaces).

Matias Valdenegro
A: 

Well, C# handles all the memory management, so you're limited in terms of hands on memory management. This isn't really a bad thing though, as it takes a lot of work away from you as the coder. It becomes a bad thing if you're heavily concerned with performance (games and the likes).

dotalchemy