Term defined by Microsoft designing code executed under the management of a Common Language Runtime virtual machine.
Questions tagged [managed-code]
58 questions
57
votes
15 answers
What exactly is "managed" code?
I've been writing C / C++ code for almost twenty years, and I know Perl, Python, PHP, and some Java as well, and I'm teaching myself JavaScript. But I've never done any .NET, VB, or C# stuff. What exactly does managed code mean?
Wikipedia describes…

Graeme Perrow
- 56,086
- 21
- 82
- 121
20
votes
11 answers
Invoke Blue Screen of Death using Managed Code
Just curious here: is it possible to invoke a Windows Blue Screen of Death using .net managed code under Windows XP/Vista? And if it is possible, what could the example code be?
Just for the record, this is not for any malicious purpose, I am just…

Matthew Ruston
- 4,282
- 7
- 38
- 47
18
votes
8 answers
The speed of .NET in numerical computing
In my experience, .NET is 2 to 3 times slower than native code. (I implemented L-BFGS for multivariate optimization).
I have traced the ads on stackoverflow to
http://www.centerspace.net/products/
the speed is really amazing, the speed is close to…

Yin Zhu
- 16,980
- 13
- 75
- 117
16
votes
3 answers
Call C# dll from Delphi
I composed .Net 3.5 dll with single method, which is to be called by Delphi .exe.
Unfortunately it does not work.
The steps:
1. Create C# 3.5 dll with the code:
public class MyDllClass
{
public static int MyDllMethod(int i)
{
…

Roi Shabtai
- 2,981
- 2
- 31
- 47
16
votes
9 answers
What advantages are there to developing a Win32 app in C++ over a .NET app in C#?
I learned windows programming using Visual C++, and the Win32 API. Nowadays, it seems most apps are being developed in .NET using C#. I understand that most of the time there isn't much performance difference between native code and managed code. So…

Joshua Carmody
- 13,410
- 16
- 64
- 83
10
votes
6 answers
Should a WPF application be written in C++/CLI or C#?
WPF applications are, at its core, managed applications? Right? So, I have to choose between using managed C++ or managed C#. I experimented with managed C++ years ago. It seemed to be not quite be ready for primetime. I'm guessing Microsoft…

zooropa
- 3,929
- 8
- 39
- 61
9
votes
11 answers
Why does C++ need language modifications to be "managed"?
Why can't a compiler be written that manages what needs to be managed in C++ code (i.e. to make it "CLR compatible")?
Maybe with some compromise, like prohibiting void pointers in some situations etc. But all these extra keywords etc. What's the…

sharkin
- 12,162
- 24
- 86
- 122
7
votes
6 answers
.NET code compilation or complication?
Q1) Why is C# initially compiled to IL and then at runtime JIT complied and run on top of a virtual machine(?). Or is it JIT complied to native machine code?
Q2) If the second is true (JIT complied to native machine code), then where is the .NET…

rkrauter
- 1,159
- 1
- 11
- 23
6
votes
4 answers
Avoiding branches in managed languages
In C, when compiled to a x86 machine, I would usually replace branches with logical expression, when speed is the most important aspect, even if the conditions are complex, for example, instead of
char isSomething() {
if (complexExpression01) {
…

MByD
- 135,866
- 28
- 264
- 277
6
votes
3 answers
My application is unmanaged. Where do I start introducing managed code?
My whole application (which is rather big, with a 20MB executable) is written in unmanaged C++.
Because I can clearly see the advantages in using managed code, I want to start introducing managed code in my application, but where do I start?
Can I…

Patrick
- 23,217
- 12
- 67
- 130
5
votes
3 answers
Why does the .NET framework not include USB tools
I am wondering why the .NET framework does not provide any managed methods for working with USB drivers. From everything I have read you still have to call into Windows API's and use marshalling and PInvoke and all that crap that none of us .NET…

PICyourBrain
- 9,976
- 26
- 91
- 136
5
votes
1 answer
Check managed assembly version on an SQL Server database
I need to find out the version of an assembly deployed to an SQL Server database.
I need to do it via script or other programmatic way to know if i need to redeploy the assembly.
Any ideas?
Thanks.

Nimrod Shory
- 2,475
- 2
- 19
- 25
5
votes
2 answers
Native code in C#?
I was watching the Microsoft build conference from October last year and I noticed they announced that for building the new Metro style apps, developers can write native code in C#. How is this possible? I'm just curious. Wasn't C# designed (as part…

Ayush
- 709
- 2
- 8
- 17
4
votes
3 answers
Remote debugging across domains
I have two machines in two different domains. On both I have VS 2005 installed. I want remote debug between them. Without authentication it is possible but I want to debug managed code. I don't want to debug directly since it is really crappy…

Michal Sznajder
- 9,338
- 4
- 44
- 62
3
votes
1 answer
Convert IntPtr to int* in C#?
I have a C++ DLL returning an int* to a C# program. The problem is the int* in C# remains null after the assignment.
When I assign the C++ result to an IntPtr, I get a correct non-null value. However any attempt to convert this to an int* results…

user20493
- 5,704
- 7
- 34
- 31