Managed Code
Managed Code
Common Language Specification (CLS) is a set of basic language features that .Net Languages
needed to develop Applications and Services, which are compatible with the .Net Framework.
When there is a situation to communicate Objects written in different .Net Complaint
languages, those objects must expose the features that are common to all the languages.
Common Language Specification (CLS) ensures complete interoperability among applications,
regardless of the language used to create the application.
Managed Code
1.The Code is Understandable by CLR.
2. It is executed under the instructions of CLR.
3. The code which is done by .net compatible language will be compiled two times. In the first
compilation, the compiler will generate MSIL code.Which is known as Managed Code.
UnManaged Code
1.The CLR cannot able to understand the code.
2. The CLR cannot instruct the code.
3. The second time compilation is unmanaged code. It is understood only by the machine not by
the user.
.Net Namespaces
Namespaces are the way to organize .NET Framework Class Library into a logical grouping
according to their functionality, usability as well as category they should belong to, or we can
say Namespaces are logical grouping of types for the purpose of identification.
The .NET Framework Class Library (FCL ) is a large collection of thousands of Classes. These
Classes are organized in a hierarchical tree. The System Namespaces is the root for types in
the .NET Framework. We can uniquely identify any Class in the .NET Framework Class Library
(FCL ) by using the full Namespaces of the class .In .Net languages every program is created with
a default Namespaces . Programmers can also create their own Namespaces in .Net languages.
Garbage Collection
The .Net Framework provides a new mechanism for releasing unreferenced objects from the
memory (that is we no longer needed that objects in the program) ,this process is called
Garbage Collection (GC). In .Net languages there is a facility that we can call Garbage Collector
(GC) explicitly in the program by calling System.GC.Collect.
Data type
A constructor is a special member function whose task is to initialize the objects of it's class.
This is the first method that is run when an instance of a type is created. A constructor is
invoked whenever an object of it's associated class is created. If a class contains a constructor,
then an object created by that class will be initialized automatically. We pass data to the
constructor by enclosing it in the parentheses following the class name when creating an
object. Constructors can never return a value.
Exception handling
Access Modifiers
Access modifiers are keywords used to specify the declared accessibility of a member or a type.
This section introduces the four access modifiers:
Operator overloading
Arrays
An array is a series of elements of the same type placed in contiguous memory locations that
can be individually referenced by adding an index to a unique identifier.
String
Class
An event in C# is a way for a class to provide notifications to clients of that class when some
interesting thing happens to an object. The most familiar use for events is in graphical user
interfaces; typically, the classes that represent controls in the interface have events that are
notified when the user does something to the control (for example, click a button).
Loop
Control Structure
Control flow (or alternatively, flow of control) refers to the order in which the individual
statements, instructions, or function calls of an imperative or a declarative program are
executed or evaluated
Inheritance
Inheritance provides a powerful and natural mechanism for organizing and structuring your
software..
Object
An object is a software bundle of related state and behavior. Software objects are often used to
model the real-world objects that you find in everyday life.
Method
A Java method is a set of Java statements which can be included inside a Java class.Java
methods are similar to functions or procedures in other programming languages.