.NET FAQs Unleashed!

 
 


    



    


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.

.NET  Languages  Versions  Tools  CLI CTS Metadata CLS IL VES  CLR  Class Library  Managed Class  Assembly ILDASM  Reflection  Assembly Types  Strong Assembly  GAC  GC  IDisposable  Serialization  Code Access Security  Attribute  Thread  Globalization  Generations  COM 

.NET INTERVIEW BOOK: