| |
|
Explain Managed code, managed class and managed data in .NET
Managed Code - The .NET framework provides lots of core runtime services to
the programs that run within it. For example - security & exception handling. Such
a code has a minimum level of information. It has metadata associated with it. Such
a code is called Managed Code. VB.NET, C#, JS.NET code is managed by default. In
order to make C++ code managed, we make use of managed extensions, which is nothing
but a postfix _gc after the class name.
Managed Data - Data that is allocated & freed by the .NET runtime's Garbage
collecter.
Managed Class - A class whose objects are managed by the CLR's garbage collector.
In VC++.NET, classes are not managed. However, they can be managed using managed extentions.
This is done using an _gc postfix. A managed C++ class can inherit from VB.NET classes,
C# classes, JS.NET classes. A managed class can inherit from only one class. .NET does'nt
allow multiple inheritance in managed classes.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
| |