C# Tutorials Overview
Welcome to C# Tutorials. The objective of these tutorials is to gain in depth understanding of C# Programming Language.
- Working with OOP synopsis concepts in C# .Net
- Working with windows programming [GUI programming] in C# .Net
- Exception handling in C# .Net
- Working with Stream Reader and Stream Writer class in C#
- Working with assemblies in C# .net
- Windows Service with Mailing concepts in C# .net
- Working with distributed programming in C# .net
- Working with Windows Service in C# .n
- OLEDB connection & command class in C# .net
- Example on Data Reader in C# .ne
- Key Related Events in C# .Net
- Working with Delegates in C# .net
- Working With DATA SET in C# .net
- C# .NET 3.5 Features
- Project Class in C# .Net
- Working with C# .Net
- Multi Threading in C# .Net
Introduction to .Net Framework
.NET Framework Supports a collections of languages like VC#.net, VC++.net, VB.net………
.NET Framework is a common architecture for all .net programming languages.
.NET - Network enabled Technology.
Visual C#. net………..visual C# with new features called as net
Main objectives of .NET Framework
Plat form independent.
Supports language interoperatibility.
Supports pure OOP's concepts
Oops - Object Oriented Programming
Supports for network programming with .net Remoting
Supports to develop back ground process with the help of windows services.
Developing or support to develop RICH GUI applications with WPF programming
DLL (Dynamic link library) (Executable) files are Executable in any OS with the help of (CLR/Common language run time ) , hence .net is called “plat form independent”
CLR software is platform dependent.
It is a separate version of CLR is introduced for every OS.
.net is not purely platform independent.
As of new CLR Software are not yet developed for dos and windows operating systems.
net application logic can be developed in any .net frame work compatible languages, hence .net is called as “LANGUAGE INDEPENDENT”.
As of now . net framework is supporting 11 languages + 1 specification.
Visual C # . net
Visual basic .net
Visual J #.net
Visual C++ .net
J Script .net
Small Talk .Net
.net support one specification called as “ASP.net”
Specification provides a set of rules which needs to be followed while integrating with a code behind language.
What is a DLL file?
As per VB 6.0 or VC ++6.0
As per VB 6.0 or VC ++6.0 DLL’s are called as COH Components.
COM is used to develop reusable programs.
Every COM Component must be registered for a class ID.
Class ID represents unique identifier , which is a part of Registry.
As Registry is under control of window OS, hence Com is “Plat form independent”.
As per .net, DLL’S Contain Plat form independent code in the format of byte code.
net DLL is also called as Managed code, Assembly or MSIL (Microsoft intermediate language )
The code written in .net is called as “managed code”
If COM is used in .net then COM is called as “un managed code”
.net frame work is introduced as a development plat form
Int I, * p;
P = &I;
As per memory management is under control of CLR with the help of Garbage collector (GC), hence .net framework is called as “Development platform”.
.net framework is derived in to platform
Frame work class library
A collection of classes is called as “Name space”
A collection of Name space is called as “Assembly”
A collection of Assembly is called as “FCL” (Frame work class library)
FCL contains –6000 predefined class
The internal organization of a DLL file is called as “Assembly Architecture”.
Assembly is derived in to three layers
Main fest Information holds the summary of the project.
Type Info holds the data type information of the languages.
MSIL holds the competed code in the format of BYTE Code.
How CLR EXECUTES an ASSEMBLY?
CLR will be loaded in to the memory.
CLR loads Main fest to understand the summary
CLR loads type Info to understand the behavior of the language.
CLR generates CTS (common type system) of CLS (Common language specifications)
Windows OS (XP, 2000p, 2005, 2003s, vista)
Visual studio .net 2008 professional Edition
Oracle / SQL Server
MS – office
Visual C # .net 3.5 2008
A collection of programs is called as a “Software”
Software is derived in to two types
A software which is developed for a specific purpose is called as “package”.
Ex :- MS – office, oracle, SQL server , operating system.
A software which is developed for a general purpose is called as a “language”.
Ex:- C, C ++, VC ++, Java, C #. Net etc……… c- family
Languages are derived in to three types
High level language
A = 10 more 10 to Ax register flip flop gates
High level language are easier to learn as these are syntactically similar to English
Assembly language are required while developing device driver programming
Which provides communication between hardware and software
Device drivers properties the communication than between the hardware and software
Visual C#.net basics
VC#.net language is architected by ANDREN HEZLSIBERG.
VC#.net belongs to 'C' family.
All the rules of ‘C’ language are applicable to VC#.net also.
C#.net is a high level compiler based programming language.
.net is case sensitive.
C#.net is highly type safe language.
In C# , always Execution starts from main ().
Writing First Example in C # .NET
(Start programsmicro soft visual studio 2008 micro soft visual studio 2008)
File menunew project
For every project a new folder will be created . by default this folder name will be same as project name.
Default folder structure
D:/C194 FIRSTBINDEBUGS DLL, EXE files will be sorted here.
Default folder structure (viewmenusolution explorer)
Open program. CS file and write the following in side of main ()
Static void Main (Strings  args)
Console . Write Line (“Welcome”);
Console . Write Line (“Date Time. Now”);
Console . Read line ();
Execute the project (F5)
When above project is executed then first.exe file will be created under D:/c194/first/bin/debug folder.
If you want to compile application, to print a message.
Console. Write Line (“Welcome”);
Syntax is required.
Date Time. Now returns system date and time.
Console .Read line () reads a string from the keyboard.