0% found this document useful (0 votes)
76 views6 pages

Atsede

The document discusses the components of the .NET framework, including the .NET Class Library, Common Language Runtime (CLR), Dynamic Language Runtime (DLR), application domains, security features, cross-language interoperability, side-by-side execution, and Common Type System (CTS).

Uploaded by

adinew abey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views6 pages

Atsede

The document discusses the components of the .NET framework, including the .NET Class Library, Common Language Runtime (CLR), Dynamic Language Runtime (DLR), application domains, security features, cross-language interoperability, side-by-side execution, and Common Type System (CTS).

Uploaded by

adinew abey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

What are the components of .Net framework?

Learn: What are the components of .Net framework? Explain - .NET Class


Library Common Language runtime, Dynamic Language runtime, Application
domains,.Net Framework Security, Cross Language interoperability, Side by side
execution, Common Type System.

.Net framework provides multiple advantages to the programmers in comparison


to the advantages provided by other platforms. Microsoft has integrated various
modern as well as existing technologies of application development in .NET
framework. These technologies are highly efficient for modern as well as future
business application. There are following components of .NET framework:

1. .NET Class Library


2. Common Language runtime
3. Dynamic Language runtime
4. Application domains
5. .Net Framework Security
6. Cross Language interoperability
7. Side by side execution
8. Common Type System

1) .NET Class Library


.NET framework contains multiple classes that are readily available for developers.
The classes in the FCL (framework class library) are grouped under multiple
namespaces.

2) Common Language Runtime


CLR provides interoperability between different language, like C# , VB, Visual C+
+, by providing a common environment for the execution of code written in of
these languages.

3) Dynamic Language runtime


DLR provides to execute dynamic languages on .NET Framework by adding some
special services to the CLR.

4) Application domains
It is used to isolate the process of different applications and can be defined by
.NET framework.

5) .NET Framework Security


.NET framework provides multiple tools that can be used by developers to
protect the resources and code from unauthorized users.

6) Cross Language interoperability


Object or complied code of one language can be used in other .NET compatible
language.

7) Side by side execution


In the same application we can use multiple versions of CLR simultaneously.

8) Common Type System


CTS is used to maintain data integrity across the code written in different .NET
compliant languages. CTS also used to prevent data loss when a type in one
language transfers data to its equivalent type in other language.

C# - Variables
Advertisements

 Previous Page
Next Page  
A variable is nothing but a name given to a storage area that our programs can
manipulate. Each variable in C# has a specific type, which determines the size and
layout of the variable's memory the range of values that can be stored within that
memory and the set of operations that can be applied to the variable.
The basic value types provided in C# can be categorized as −

Type Example

Integral types sbyte, byte, short, ushort, int, uint, long, ulong, and char

Floating point types float and double

Decimal types decimal

Boolean types true or false values, as assigned

Nullable types Nullable data types

C# also allows defining other value types of variable such as enum and reference
types of variables such as class, which we will cover in subsequent chapters.

Defining Variables
Syntax for variable definition in C# is −
<data_type> <variable_list>;
Here, data_type must be a valid C# data type including char, int, float, double, or any
user-defined data type, and variable_list may consist of one or more identifier names
separated by commas.
Some valid variable definitions are shown here −
int i, j, k;
char c, ch;
float f, salary;
double d;
You can initialize a variable at the time of definition as −
int i = 100;

Initializing Variables
Variables are initialized (assigned a value) with an equal sign followed by a constant
expression. The general form of initialization is −
variable_name = value;
Variables can be initialized in their declaration. The initializer consists of an equal sign
followed by a constant expression as −
<data_type> <variable_name> = value;
Some examples are −
int d = 3, f = 5; /* initializing d and f. */
byte z = 22; /* initializes z. */
double pi = 3.14159; /* declares an approximation of pi. */
char x = 'x'; /* the variable x has the value 'x'. */

It is a good programming practice to initialize variables properly, otherwise sometimes


program may produce unexpected result.
The following example uses various types of variables −
Live Demo

 C# the #define preprocessor directive cannot be used to define constants in the way


that is typically used in C and C++.

To define constant values of integral types (int, byte, and so on) use an enumerated
type. For more information, see enum.

To define non-integral constants, one approach is to group them in a single static class
named Constants. This will require that all references to the constants be prefaced with
the class name, as shown in the following example.

Example
C#Copy
static class Constants
{
public const double Pi = 3.14159;
public const int SpeedOfLight = 300000; // km per sec.
}
class Program
{
static void Main()
{
double radius = 5.3;
double area = Constants.Pi * (radius * radius);
int secsFromSun = 149476000 / Constants.SpeedOfLight; // in km
}
}

The use of the class name qualifier helps ensure that you and others who use the
constant understand that it is constant and cannot be modified.

using System;

namespace VariableDefinition {
class Program {
static void Main(string[] args) {
short a;
int b ;
double c;

/* actual initialization */
a = 10;
b = 20;
. An array stores a fixed-size sequential collection of elements of the same type. An array is
used to store a collection of data, but it is often more useful to think of an array as a collection
of variables of the same type stored at contiguous memory locations. c = a + b;
Console.WriteLine("a = {0}, b = {1}, c = {2}", a, b, c);
Console.ReadLine();
}
}
}

When the above code is compiled and executed, it produces the following result −
a = 10, b = 20, c = 30
. An array stores a fixed-size sequential collection of elements of the same type. An array is
used to store a collection of data, but it is often more useful to think of an array as a collection
of What is conditional control?

Conditional control allows you to control the program's flow of the execution based


on a condition. In programming terms, this means that the statements in the program
are not executed sequentially. Rather, one group of statements or another is executed,
depending on how the condition is evaluated
variables of the same type st

Control statements index

BASIC

A control statement is a statement that determines whether other statements will be


executed.
 An if statement decides whether to execute another statement, or decides which
of two statements to execute.

 A loop decides how many times to execute another statement. There are three
kinds of loops:

o while loops test whether a condition is true before executing the


controlled statement.

o do-while loops test whether a condition is true after executing the


controlled statement.

o for loops are (typically) used to execute the controlled statement a given


number of times.

 A switch statement decides which of several statements to execute.

ored at contiguous memory locations.

You might also like