Variables: MSIL Stands For Microsoft Intermediate Language and IL Stands For Intermediate Language
Variables: MSIL Stands For Microsoft Intermediate Language and IL Stands For Intermediate Language
compiled to. You can run this application (like any other) ONLY if you have
the .NET framework installed. (not good for me)
JIT - Just In Time - compile to other platforms whenever you need it, just in
time.
MSIL stands for Microsoft Intermediate Language and IL stands for Intermediate Language.
Both are same and IL is just short form MSIL. MSIL is CPU independent code and contains
instructions that are readily convertible to native code.
MSIL or IL is the assembly language that every .Net language first compiles into using their
respective compiler.
CLR is an abbreviation for Common Language Runtime and is the most vital component of
the .NET framework. All languages have runtime and it is the responsibility of a runtime to take
care of the code execution.
For example, Java has its Java Virtual Machine and VB6 has MSVBVM60.Dll. Similarly .Net
has CLR.
Variables
A variable is a place in memory where the application can store some type of information. This
information can be a number, a string, a class, a delegate, or even a custom data type. Variables
are very important for data manipulation. It would be hard to create a useful program that had no
way of storing and manipulating different types of data. A computer variable is very similar to
algebraic variables used in high school math. For example:
x = 5
y = 4x + 2
By using algebra we can solve for y. We can do this by first substituting the value of x into the
equation, and then adding 2 to 4*x. The final result is 4*5 + 2 = 22.
Other Versions
The namespace keyword is used to declare a scope. This namespace scope lets you organize
code and gives you a way to create globally unique types.
Copy
namespace SampleNamespace
{
class SampleClass{}
interface SampleInterface{}
struct SampleStruct{}
enum SampleEnum{a,b}
delegate void SampleDelegate(int i);
namespace SampleNamespace.Nested
{
class SampleClass2{}
}
}
Remarks
Within a namespace, you can declare one or more of the following types:
another namespace
class
interface
struct
enum
delegate
Console.Read -
Reads the next character from the standard input stream.
Console.ReadLine -
Reads the next line of characters from the standard input stream.
Use Console.Read when you need to read a single character from the input stream.
Use Console.ReadLine when you need to read a string from the user.
using System;
class Program
{
static void Main()
{
Console.WriteLine("{0} = {1}",
100,
ConvertTemp.ConvertCelsiusToFahrenheit(100));
Console.WriteLine("{0} = {1}",
212,
ConvertTemp.ConvertFahrenheitToCelsius(212));
Console.WriteLine("{0} = {1}",
50,
ConvertTemp.ConvertCelsiusToFahrenheit(50));
Console.WriteLine("{0} = {1}",
122,
ConvertTemp.ConvertFahrenheitToCelsius(122));
}
using System;
class Program
{
static void Main()
{
//
// Show the temperature of the human body in Celsius.
//
double h = 98.6;
double hc = ConvertTemp.ConvertFahrenheitToCelsius(h);
Console.WriteLine("{0}, {1}",
h.ToString(),
hc.ToString("00.0"));
}
}