DotNet Notes | Microsoft Visual Studio | Integer (Computer Science)
Short Description
DotNet Notes - Download as Word Doc (.doc), PDF File (.pdf), Text File (.txt) or read online....
Description
Visual Studio 6.0 --------------------1. visual Basic 2. visual c++ 3. visual Foxpro 4. visual Interdev(html and asp applications) vb, vb+ used for developing windows applications or client/server applications. Using .NET we can develop language independent and platform Independent applications visual studio.Net (or) vs.NET -----------------------------------Flavours of vs.NET 1. visual Basic.NET visual Basic 2. visual c#.NET c# 3. visual c++.NET c++ 4. vi visual Js Jscript.NET Jscript 5. visual J# J# Microsoft c# is a new programming programming language designed for building a wide range of enterprise applications that run on the NET Framework. c# is simple, moder modern, n, type type safe, safe, and and objec objectt orient oriented. ed. .Net .Net is a fram framew ework ork for develo developin ping g enterpr enterprise ise distribu distributed ted applicat applications ions.. Microso Microsoft.N ft.Net et is a software software develop developmen mentt platform based on virtual machine based architecture. Net is designed to support programming programming language independent independent application application development. development. The entire .net programs are independent of any particular o/s and physical hardware machine. The core component is a abstraction abstraction of execution environment and manages the overall execution of any of the .net based programs
.Net Framework .Net Framework provides simplified application development environment to create distributed applications for the web. Objectives: 1. Provides a consistence Object Oriented Programming environment that allows code to be stored and executed irrespective of where the code is stored or from where it is executed. 2. To minimize minimize software software deployment deployment procedures procedures and and versioning versioning conflicts. conflicts. 3. To ensure ensure safe executi execution on of code irresp irrespecti ective ve of who develope developed d it (third party code) 4. Deve Develop lop widely widely vary varying ing types types of appli applica catio tions ns such as wind window ow based based,, console based and web based applications. 5. To ensure the code based on the .Net Framework can integrate with any other code irrespective of where it was developed.
.NET Framework has two main components. 1. Common Language Runtime. 2. .Net Framework Class Library. Common Language Runtime (CLR) Once you have written you source code, you run it through the corresponding compiler and the compiler produces an Assembly. Assembly is a file that contains Microsoft Intermediate Language (MSIL) and Metadata. MSIL is an intermediate language that is CPU-Independent. At Runtime the CLR compiles the MSIL code into native CPU code. If the application is running on Pentium Machine, the CLR produces native “x86” code. If the machine is with Itanium processor, the CLR produces native “I464” code. FEATURES OF CLR: a) Automatic memory management: The runtime automatically handles object layout & manages references to objects, Releasing them when they are no longer being used. •
•
This automatic memory management resolves the two most common application errors; i. Memory leaks ii. Invalid memory references. b) c) d) e)
Thread Execution Code safety Verification Compilation & Some other system services.
These features are essential to the managed code that runs on the CLR. Architecture VB Source Code
VB Com iler
Assembly (file) MSIL
VC++ Source
VC++ Com iler
metadata
Linker
Assembly (file) MSIL
metadata
Class Library
EXE/DLL
Gets Executed Under CLR JIT
Managed Code: Code that targets the runtime is called managed code; it benefits from features such as cross-language integration, cross-language exception handling, enhanced security etc. Unmanaged Code: Code that does not target the runtime is called unmanaged code.
MSIL When compiling to managed code, the compiler translates your source code into Microsoft intermediate language (MSIL), which is a CPU-independent set of instructions that can be efficiently converted to native code. MSIL includes instructions for loading, storing, initializing, and calling methods on objects, as well as instructions for arithmetic and logical operations, control flow, direct memory access, exception handling, and other operations. Metadata: Metadata is a set of tables that are embedded in the assembly file. These tables are produced by the compiler and contain a great deal of information about the application. It has tables that describe all of the types, methods and fields that were defined by the application’s source code. In addition metadata also includes tables that are referenced by the methods in the application’s source code. Metadata describes the types in your code, including the definition of each type, the signatures of each type's members, the members that your code references, and other data that the runtime uses at execution time. The MSIL and metadata are contained in a portable executable (PE) file that is based on and extends the published Microsoft PE and Common Object File Format (COFF) used historically for executable content. Just in Time Compiler (JIT) The managed code is never interpreted by the CLR. A feature called just-in-time compiling enables all managed code to run in the native machine language of the current system. Before code can be executed, MSIL must be converted to CPU-specific code, usually by a just-in-time (JIT) compiler. Because the common language runtime supplies one or more JIT compilers for each computer architecture it supports, the same set of MSIL can be JIT-compiled and executed on any supported architecture.
Namespace The .NET Framework class library is comprised of namespaces. Each namespace contains types that you can use in your program: classes, structures, enumerations, delegates, and interfaces. Namespaces allow for the logical grouping of related files. Many compilers will offer mechanism to reduce programmer’s typing. VB.Net exposes this mechanism via the “Imports” statement. e.g. to include namespaces in our vb applications. Imports System Imports System.Collections Imports System.IO Class Library The class library is a comprehensive, object-oriented collection of reusable types that tightly integrated with CLR. From these reusable types, managed code can derive functionality. These collection of reusable types, we can use to applications ranging from Traditional command line (or) GUI applications to applications based on the latest innovations provided by ASP.NET such as Webforms & XML Web services. Our own collection of classes will also be mixed or joined seamlessly with the classes in the .Net framework. It also supports for some specialized tasks. e.g. You can use the .Net framework to develop Console applications Scripted or hosted applications Windows GUI (Windows) applications ASP.Net applications XML web services • • • • •
Dot Net Languages :- COBOL, Jscript .NET, Eiffel, Haskell / Mondrian, Pascal, ML, APL, Alice
C, Visual C++, Visual Basic, Visual C#, Smalltalk, Oberon, Scheme, Mercury, Python
Sl. No.
Category
Class
Description
Visual Basic
Name
data type
1
Byte
An 8-bit unsigned Integer
Byte
2
Int 16
A 16-bit Signed Integer
Short
Int 32
A 32-bit Signed Integer
Integer
4
Int 64
A 64-bit Signed Integer
Long
5
Single
3
6 7
Integer
Floating Point Logical
8
Double Boolean
A Single-Precision (32-bit) floating point number A Double-Precision (64-bit) floating point number. A Boolean Value (True or False)
Single Double Boolean
Char
A Unicode (16-bit) Character.
Char
9
Decimal
A 96-bit decimal value
Decimal
10
Object
Other
11
Class Objects
String
The root of the object hierarchy An Immutable fixed-length string of Unicode characters.
Object String
Type
Range
Size
sbyte
-128 to 127
Signed 8-bit integer
byte
0 to 255
Unsigned 8bit integer
char
U+0000 to U+ffff
Unicode 16bit character
short
-32,768 to 32,767
Signed 16-bit integer
ushort 0 to 65,535
Unsigned 16bit integer
int
-2,147,483,648 to 2,147,483,647
Signed 32-bit integer
uint
0 to 4,294,967,295
Unsigned 32-
bit integer long
-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
Signed 64-bit integer
ulong
0 to 18,446,744,073,709,551,615
Unsigned 64bit integer
Type
Approximate range
Precision
float
±1.5e−45 to ±3.4e38
7 digits
double
±5.0e−324 to ±1.7e308
15-16 digits
Type
Approximate Range
decimal ±1.0 × 10−28 to ±7.9 × 1028
Precision
.NET Framework type
28-29 significant digits
System.Decimal
Variables of reference types, referred to as objects, store references to the actual data. This section introduces the following keywords used to de clare reference types: •
class
•
interface
•
delegate
This section also introduces the following built-in reference types: •
object
•
string
View more...
Comments