SlideShare a Scribd company logo
1 of 39
  Basics of C# 2008 .NET 3.0/3.5
Session Objectives ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Basic Structure of C# Program ,[object Object]
Getting Command-Line Input ,[object Object],[object Object],[object Object],[object Object]
Interactive via Command Line ,[object Object],[object Object],[object Object]
Object Oriented Programming Fundamentals ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Console Application in VS 2008 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Basics ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Integer Types Name CTS Type Description sbyte System.Sbyte 8-bit signed integer short  System.Int16 16-bit signed integer int  System.Int32 32-bit signed integer long System.Int64 64-bit signed integer byte  System.Byte 8-bit unsigned integer ushort  System.UInt16 16-bit unsigned integer uint  System.UInt32 32-bit unsigned integer ulong System.UInt64 64-bit unsigned integer
Floating-Point Types Name CTS Type Description float  System.Single 32-bit single-precision floating point double  System.Double 64-bit double precision floating point
Decimal Type Name CTS Type Description decimal  System.Decimal 128-bit high precision decimal notation
Boolean Type ,[object Object]
Character Type Name CTS Type Description char  System.Char 16-bit Unicode character
Escape Sequences Escape Sequence Character  Single quotation mark  Double quotation mark  Backslash  Null  Alert  Backspace  Form feed   New line  Carriage return  Tab character  Vertial tab
Predefined Reference Types Name CTS Type Description object  System.Object The root type string  System.String Unicode character string
Object Type
Methods of Object Type ,[object Object],[object Object],[object Object],[object Object]
The string Type
Operators in C# ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Operators in C# (contd…) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
checked operator ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
unchecked operator ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
is operator ,[object Object],[object Object],[object Object],[object Object],[object Object]
as operator ,[object Object],[object Object],[object Object]
sizeof operator ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
typeof operator ,[object Object],[object Object],[object Object]
Type Conversions ,[object Object],[object Object]
Boxing and Unboxing
Flow Control ,[object Object],[object Object],[object Object]
Conditional Statements ,[object Object],[object Object],[object Object],[object Object]
Loops ,[object Object],[object Object],[object Object],[object Object]
Jump Statements ,[object Object],[object Object],[object Object],[object Object]
Enumerations ,[object Object],[object Object]
Arrays
Namespaces
using Statement
More on Compiling Options Option Output /t:exe A console application (default) /t:library A class library with manifest /t:module A component without a manifest /t:winexe A windows application (without a console window)
Console I/O ,[object Object],[object Object],[object Object],[object Object]
Using Comments ,[object Object],[object Object],[object Object],[object Object],[object Object]

More Related Content

What's hot

What's hot (20)

C# programming language
C# programming languageC# programming language
C# programming language
 
Properties and indexers in C#
Properties and indexers in C#Properties and indexers in C#
Properties and indexers in C#
 
Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)
 
Oops concept on c#
Oops concept on c#Oops concept on c#
Oops concept on c#
 
C# Basics
C# BasicsC# Basics
C# Basics
 
Introduction to .net framework
Introduction to .net frameworkIntroduction to .net framework
Introduction to .net framework
 
Object Oriented Programming with C#
Object Oriented Programming with C#Object Oriented Programming with C#
Object Oriented Programming with C#
 
7.data types in c#
7.data types in c#7.data types in c#
7.data types in c#
 
Functions in c language
Functions in c language Functions in c language
Functions in c language
 
C# Access modifiers
C# Access modifiersC# Access modifiers
C# Access modifiers
 
Collections in-csharp
Collections in-csharpCollections in-csharp
Collections in-csharp
 
Arrays in Java
Arrays in JavaArrays in Java
Arrays in Java
 
C# Tutorial
C# Tutorial C# Tutorial
C# Tutorial
 
C# lecture 2: Literals , Variables and Data Types in C#
C# lecture 2: Literals , Variables and Data Types in C#C# lecture 2: Literals , Variables and Data Types in C#
C# lecture 2: Literals , Variables and Data Types in C#
 
Object oriented programming With C#
Object oriented programming With C#Object oriented programming With C#
Object oriented programming With C#
 
OOP in C++
OOP in C++OOP in C++
OOP in C++
 
C# Arrays
C# ArraysC# Arrays
C# Arrays
 
Array in Java
Array in JavaArray in Java
Array in Java
 
Introduction to c++ ppt 1
Introduction to c++ ppt 1Introduction to c++ ppt 1
Introduction to c++ ppt 1
 
Templates in C++
Templates in C++Templates in C++
Templates in C++
 

Similar to C# basics

Getting started with C# Programming
Getting started with C# ProgrammingGetting started with C# Programming
Getting started with C# ProgrammingBhushan Mulmule
 
434090527-C-Cheat-Sheet. pdf C# program
434090527-C-Cheat-Sheet. pdf  C# program434090527-C-Cheat-Sheet. pdf  C# program
434090527-C-Cheat-Sheet. pdf C# programMAHESHV559910
 
CSharp Language Overview Part 1
CSharp Language Overview Part 1CSharp Language Overview Part 1
CSharp Language Overview Part 1Hossein Zahed
 
CSharpCheatSheetV1.pdf
CSharpCheatSheetV1.pdfCSharpCheatSheetV1.pdf
CSharpCheatSheetV1.pdfssusera0bb35
 
devLink - What's New in C# 4?
devLink - What's New in C# 4?devLink - What's New in C# 4?
devLink - What's New in C# 4?Kevin Pilch
 
02. Primitive Data Types and Variables
02. Primitive Data Types and Variables02. Primitive Data Types and Variables
02. Primitive Data Types and VariablesIntro C# Book
 
C# Language Overview Part I
C# Language Overview Part IC# Language Overview Part I
C# Language Overview Part IDoncho Minkov
 
04. Console Input Output
04. Console Input Output 04. Console Input Output
04. Console Input Output Intro C# Book
 
C traps and pitfalls for C++ programmers
C traps and pitfalls for C++ programmersC traps and pitfalls for C++ programmers
C traps and pitfalls for C++ programmersRichard Thomson
 
Esoft Metro Campus - Certificate in c / c++ programming
Esoft Metro Campus - Certificate in c / c++ programmingEsoft Metro Campus - Certificate in c / c++ programming
Esoft Metro Campus - Certificate in c / c++ programmingRasan Samarasinghe
 
Introduction to c sharp 4.0 and dynamic
Introduction to c sharp 4.0 and dynamicIntroduction to c sharp 4.0 and dynamic
Introduction to c sharp 4.0 and dynamicGieno Miao
 
IntroToCSharpcode.ppt
IntroToCSharpcode.pptIntroToCSharpcode.ppt
IntroToCSharpcode.pptpsundarau
 
IntroductionToCSharp.ppt
IntroductionToCSharp.pptIntroductionToCSharp.ppt
IntroductionToCSharp.pptRishikaRuhela
 

Similar to C# basics (20)

Getting started with C# Programming
Getting started with C# ProgrammingGetting started with C# Programming
Getting started with C# Programming
 
434090527-C-Cheat-Sheet. pdf C# program
434090527-C-Cheat-Sheet. pdf  C# program434090527-C-Cheat-Sheet. pdf  C# program
434090527-C-Cheat-Sheet. pdf C# program
 
CSharp Language Overview Part 1
CSharp Language Overview Part 1CSharp Language Overview Part 1
CSharp Language Overview Part 1
 
CSharpCheatSheetV1.pdf
CSharpCheatSheetV1.pdfCSharpCheatSheetV1.pdf
CSharpCheatSheetV1.pdf
 
devLink - What's New in C# 4?
devLink - What's New in C# 4?devLink - What's New in C# 4?
devLink - What's New in C# 4?
 
Csharp4 basics
Csharp4 basicsCsharp4 basics
Csharp4 basics
 
02. Primitive Data Types and Variables
02. Primitive Data Types and Variables02. Primitive Data Types and Variables
02. Primitive Data Types and Variables
 
C# Language Overview Part I
C# Language Overview Part IC# Language Overview Part I
C# Language Overview Part I
 
Linq intro
Linq introLinq intro
Linq intro
 
04. Console Input Output
04. Console Input Output 04. Console Input Output
04. Console Input Output
 
C traps and pitfalls for C++ programmers
C traps and pitfalls for C++ programmersC traps and pitfalls for C++ programmers
C traps and pitfalls for C++ programmers
 
PostThis
PostThisPostThis
PostThis
 
Esoft Metro Campus - Certificate in c / c++ programming
Esoft Metro Campus - Certificate in c / c++ programmingEsoft Metro Campus - Certificate in c / c++ programming
Esoft Metro Campus - Certificate in c / c++ programming
 
C# overview part 1
C# overview part 1C# overview part 1
C# overview part 1
 
Introduction to c sharp 4.0 and dynamic
Introduction to c sharp 4.0 and dynamicIntroduction to c sharp 4.0 and dynamic
Introduction to c sharp 4.0 and dynamic
 
C#
C#C#
C#
 
IntroToCSharpcode.ppt
IntroToCSharpcode.pptIntroToCSharpcode.ppt
IntroToCSharpcode.ppt
 
Cpprm
CpprmCpprm
Cpprm
 
Visual c sharp
Visual c sharpVisual c sharp
Visual c sharp
 
IntroductionToCSharp.ppt
IntroductionToCSharp.pptIntroductionToCSharp.ppt
IntroductionToCSharp.ppt
 

More from Dinesh kumar (11)

Cv
CvCv
Cv
 
Dinesh cv
Dinesh cvDinesh cv
Dinesh cv
 
Dinesh cv
Dinesh cvDinesh cv
Dinesh cv
 
Data management with ado
Data management with adoData management with ado
Data management with ado
 
Asp.net
 Asp.net Asp.net
Asp.net
 
My resume
My resumeMy resume
My resume
 
Dinesh ppt -windows 7
Dinesh ppt -windows 7Dinesh ppt -windows 7
Dinesh ppt -windows 7
 
Functional specs
Functional specsFunctional specs
Functional specs
 
Screen shots
Screen shotsScreen shots
Screen shots
 
technology@web
technology@webtechnology@web
technology@web
 
Web2 0
Web2 0Web2 0
Web2 0
 

C# basics

  • 1. Basics of C# 2008 .NET 3.0/3.5
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9. Integer Types Name CTS Type Description sbyte System.Sbyte 8-bit signed integer short System.Int16 16-bit signed integer int System.Int32 32-bit signed integer long System.Int64 64-bit signed integer byte System.Byte 8-bit unsigned integer ushort System.UInt16 16-bit unsigned integer uint System.UInt32 32-bit unsigned integer ulong System.UInt64 64-bit unsigned integer
  • 10. Floating-Point Types Name CTS Type Description float System.Single 32-bit single-precision floating point double System.Double 64-bit double precision floating point
  • 11. Decimal Type Name CTS Type Description decimal System.Decimal 128-bit high precision decimal notation
  • 12.
  • 13. Character Type Name CTS Type Description char System.Char 16-bit Unicode character
  • 14. Escape Sequences Escape Sequence Character Single quotation mark Double quotation mark Backslash Null Alert Backspace Form feed New line Carriage return Tab character Vertial tab
  • 15. Predefined Reference Types Name CTS Type Description object System.Object The root type string System.String Unicode character string
  • 17.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 37. More on Compiling Options Option Output /t:exe A console application (default) /t:library A class library with manifest /t:module A component without a manifest /t:winexe A windows application (without a console window)
  • 38.
  • 39.