SlideShare ist ein Scribd-Unternehmen logo
1 von 13
OVERVIEW OF
What is C#?
 It is a computer-programming language developed by Microsoft
Corporation, USA.
 It is fully object-oriented language.
 Suitable for developing Web-based applications
 Designed for developing robust, reliable & durable components
to handle real-world applications.
Highlights of C#
 Derived from C/C++ family.
 It simplifies & modernizes C++.
 It is only component oriented language available today.
 It is a language designed for the .NET Framework.
 It is a concise, lean & modern language.
 It combines the best features of many commonly used languages: the
productivity of VB, the power of C++, & the elegance of Java.
 It is intrinsically object-oriented & web-enabled.
 It has a lean & consistent syntax.
 It is simple, robust & productive.
 Major parts of .NET Framework are actually coded in C#.
Why C# ?????
 The primary motivation while developing any language is the
concern that it able to handle the increasing complexity of programs
that are robust, durable & maintainable.
 The history of major languages developed is as follows:
BPCL B
C
C++
ANSI C
Oak
Java
ANSI C++
C#
1967 1970
1972
1983
1987
1991
1995
1996
2000
Dennis Ritchie
Bjarne Stroustrup
ANSI Committee
James Gostling
Sun MicroSystems
ANSI Committe
Microsoft
Martin Richards Ken Thompson
Continue….
 C & C++ languages suffer from a
number of shortcomings in
meeting World Wide Web
requirements & standards.
 Some are as follows:
1. The high complexity of language
2. They are not truly object oriented
3. They have poor type safety
4. They are not suitable for working
with new web technologies.
5. They do not support versioning
6. They are weak in consistency
7. Their poor compatibility with the
existing systems
 VB, a language promoted by
Microsoft for overcoming these
problems, is not truly object-
oriented and becomes
increasingly difficult to use when
systems become large.
 Java which is truly object-
oriented has not retained some
powerful C++ features such as
operator overloading.
 Java also lacks inter-operability
with code developed in other
languages.
 Microsoft therefore decided to
design a new language.
 The result is C#, a simple &
modern language that directly
addresses the needs of
component-based software
development.
 C# is a descendant of C++ which in turn is a
descendant of C as illustrated below:
C
C++
Java C# VB
Concept
ProductivityElegance
Concept
Component
Orientation
Object
Orentation
Power
Characteristics of C#
 Simple
 C# simplifies C++ by eliminating irksome operators such as ->,
::, and pointers.
 C# treats integers & Boolean data types as entirely different
types.
 Consistent
 C# supports an unified type system which eliminates the
problem of varying ranges of integer types.
 All types are treated as objects.
 Modern
 C# is called modern language because it supports:
 Automatic garbage collection
 Rich intrinsic model for error handling
 Decimal data types for financial applications
 Modern approach to debugging
 Robust security model
Continue….
 Object-Oriented
 C# is truly object-oriented. It supports:
 Encapsulation
 Inheritance
 Polymorphism
 Type-Safe
 Type safety promotes robust programs.
 C# incorporates number of type-safe measures:
 All dynamically allocated objects & arrays are initialized to
zero
 Use of any uninitialized variables produces an error message
by the compiler
 C# supports automatic garbage collection
 Version able
 Making new versions of software modules work with the
existing applications is known as versioning
 C# provides support for versioning with the help of new &
override keywords.
 Compatible
 C# enforces the .NET common
language specifications & therefore
allows inter-operation with other
.NET languages
 Interoperable
 C# provides support for using COM
objects, no matter what language
was used to author them.
 Flexible
 We may declare certain classes &
methods as ‘unsafe’ and then use
pointers to manipulate them.
Continue…
How Does C# differs from Java ?
1. C# has more primitive data types
2. Arrays are declared differently in C#
3. C# supports struct type & Java does not
4. Java does not provide for operator overloading
5. C# provides for better versioning support than Java
6. C# provides static constructors for initialization
7. Java does not directly support enumerations
8. C# uses is operator instead of instanceof operator in Java
9. C# checks overflows uses checked statements
10. There is no labeled break statement in C#. The goto statement is
used to achieve this.
11. In Java, the switch statement can have only integer expression,
while C# supports either an integer or string expressions
A Simple C# Program
class SampleOne
{
public static void Main()
{
System.Console.WriteLine(“C# is sharper than C++”);
}
}
 Executing the program
 Save the above file with SampleOne.cs name
 Compile as : csc SampleOne.cs
 C# compiler compiles your code and create an executable file by
name
 SampleOne.exe
 For executing the program, simply type in the name of the
executable file at the command prompt.
NAMESPACES
System.Console.WriteLine();
 Here System is a namespace in which the Console class is located.
 This class can be accessed using the dot operator.
 C# supports using directive that can be used to import the
namespace System into the program.
using System;
class SampleTwo
{
public static void Main()
{
Console.WriteLine(“Hello World!!!”);
}
}
Providing Interactive Input
using System;
class SampleEight
{
public static void Main(string[] args)
{
Console.Write(“Enter Your Name”);
string name = Console.ReadLine();
Console.WriteLine(“Hello ”+name);
}
}

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to .net framework
Introduction to .net frameworkIntroduction to .net framework
Introduction to .net frameworkArun Prasad
 
Introduction To Dotnet
Introduction To DotnetIntroduction To Dotnet
Introduction To DotnetSAMIR BHOGAYTA
 
.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework OverviewDoncho Minkov
 
.NET and C# Introduction
.NET and C# Introduction.NET and C# Introduction
.NET and C# IntroductionSiraj Memon
 
dot net technology
dot net technologydot net technology
dot net technologyImran Khan
 
Introduction To C#
Introduction To C#Introduction To C#
Introduction To C#rahulsahay19
 
Introduction to Java Programming Language
Introduction to Java Programming LanguageIntroduction to Java Programming Language
Introduction to Java Programming Languagejaimefrozr
 
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)Michelle Anne Meralpis
 
Oops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaOops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaMadishetty Prathibha
 
Dotnet Basics Presentation
Dotnet Basics PresentationDotnet Basics Presentation
Dotnet Basics PresentationSudhakar Sharma
 
Inheritance in java
Inheritance in javaInheritance in java
Inheritance in javaRahulAnanda1
 
oops concept in java | object oriented programming in java
oops concept in java | object oriented programming in javaoops concept in java | object oriented programming in java
oops concept in java | object oriented programming in javaCPD INDIA
 

Was ist angesagt? (20)

Programming in c#
Programming in c#Programming in c#
Programming in c#
 
C#.NET
C#.NETC#.NET
C#.NET
 
Introduction to .net framework
Introduction to .net frameworkIntroduction to .net framework
Introduction to .net framework
 
C sharp
C sharpC sharp
C sharp
 
Introduction to .NET Framework
Introduction to .NET FrameworkIntroduction to .NET Framework
Introduction to .NET Framework
 
Introduction To Dotnet
Introduction To DotnetIntroduction To Dotnet
Introduction To Dotnet
 
.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework Overview
 
.NET and C# Introduction
.NET and C# Introduction.NET and C# Introduction
.NET and C# Introduction
 
dot net technology
dot net technologydot net technology
dot net technology
 
Introduction To C#
Introduction To C#Introduction To C#
Introduction To C#
 
Introduction to Java Programming Language
Introduction to Java Programming LanguageIntroduction to Java Programming Language
Introduction to Java Programming Language
 
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)
 
DOT Net overview
DOT Net overviewDOT Net overview
DOT Net overview
 
Introduction to c#
Introduction to c#Introduction to c#
Introduction to c#
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Oops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaOops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in Java
 
Dotnet Basics Presentation
Dotnet Basics PresentationDotnet Basics Presentation
Dotnet Basics Presentation
 
Inheritance in java
Inheritance in javaInheritance in java
Inheritance in java
 
Introduction to C# Programming
Introduction to C# ProgrammingIntroduction to C# Programming
Introduction to C# Programming
 
oops concept in java | object oriented programming in java
oops concept in java | object oriented programming in javaoops concept in java | object oriented programming in java
oops concept in java | object oriented programming in java
 

Andere mochten auch

Lect 1. introduction to programming languages
Lect 1. introduction to programming languagesLect 1. introduction to programming languages
Lect 1. introduction to programming languagesVarun Garg
 
Functional Programming in C# and F#
Functional Programming in C# and F#Functional Programming in C# and F#
Functional Programming in C# and F#Alfonso Garcia-Caro
 
Computer Programming Overview
Computer Programming OverviewComputer Programming Overview
Computer Programming Overviewagorolabs
 
C# Tutorial
C# Tutorial C# Tutorial
C# Tutorial Jm Ramos
 
C Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointC Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointJavaTpoint.Com
 
Types of Software Testing
Types of Software TestingTypes of Software Testing
Types of Software TestingNishant Worah
 
Jira as a Tool for Test Management
Jira as a Tool for Test ManagementJira as a Tool for Test Management
Jira as a Tool for Test ManagementMaija Laksa
 
Using JIRA Software for Issue Tracking
Using JIRA Software for Issue TrackingUsing JIRA Software for Issue Tracking
Using JIRA Software for Issue TrackingAnjali Rao
 
INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGAbhishek Dwivedi
 
Software Testing Basics
Software Testing BasicsSoftware Testing Basics
Software Testing BasicsBelal Raslan
 
C# coding standards, good programming principles & refactoring
C# coding standards, good programming principles & refactoringC# coding standards, good programming principles & refactoring
C# coding standards, good programming principles & refactoringEyob Lube
 
Basics of C programming
Basics of C programmingBasics of C programming
Basics of C programmingavikdhupar
 
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...Beat Signer
 
Introduction To Jira
Introduction To JiraIntroduction To Jira
Introduction To JiraHua Soon Sim
 
Introduction to JIRA & Agile Project Management
Introduction to JIRA & Agile Project ManagementIntroduction to JIRA & Agile Project Management
Introduction to JIRA & Agile Project ManagementDan Chuparkoff
 
Software Testing Fundamentals
Software Testing FundamentalsSoftware Testing Fundamentals
Software Testing FundamentalsChankey Pathak
 

Andere mochten auch (20)

Sql Overview
Sql OverviewSql Overview
Sql Overview
 
Lect 1. introduction to programming languages
Lect 1. introduction to programming languagesLect 1. introduction to programming languages
Lect 1. introduction to programming languages
 
Functional Programming in C# and F#
Functional Programming in C# and F#Functional Programming in C# and F#
Functional Programming in C# and F#
 
Introduction to Database SQL & PL/SQL
Introduction to Database SQL & PL/SQLIntroduction to Database SQL & PL/SQL
Introduction to Database SQL & PL/SQL
 
Computer Programming Overview
Computer Programming OverviewComputer Programming Overview
Computer Programming Overview
 
C# Tutorial
C# Tutorial C# Tutorial
C# Tutorial
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 
C Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointC Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpoint
 
Types of Software Testing
Types of Software TestingTypes of Software Testing
Types of Software Testing
 
Dbms
DbmsDbms
Dbms
 
Jira as a Tool for Test Management
Jira as a Tool for Test ManagementJira as a Tool for Test Management
Jira as a Tool for Test Management
 
Using JIRA Software for Issue Tracking
Using JIRA Software for Issue TrackingUsing JIRA Software for Issue Tracking
Using JIRA Software for Issue Tracking
 
INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMING
 
Software Testing Basics
Software Testing BasicsSoftware Testing Basics
Software Testing Basics
 
C# coding standards, good programming principles & refactoring
C# coding standards, good programming principles & refactoringC# coding standards, good programming principles & refactoring
C# coding standards, good programming principles & refactoring
 
Basics of C programming
Basics of C programmingBasics of C programming
Basics of C programming
 
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
 
Introduction To Jira
Introduction To JiraIntroduction To Jira
Introduction To Jira
 
Introduction to JIRA & Agile Project Management
Introduction to JIRA & Agile Project ManagementIntroduction to JIRA & Agile Project Management
Introduction to JIRA & Agile Project Management
 
Software Testing Fundamentals
Software Testing FundamentalsSoftware Testing Fundamentals
Software Testing Fundamentals
 

Ähnlich wie C# programming language

Event Driven Programming in C#.docx
Event Driven Programming in C#.docxEvent Driven Programming in C#.docx
Event Driven Programming in C#.docxLenchoMamudeBaro
 
programming in c#.ppt
programming in c#.pptprogramming in c#.ppt
programming in c#.pptNalinaKumari2
 
21UCAC61 C# and .Net Programming.pdf(MTNC)(BCA)
21UCAC61 C# and .Net Programming.pdf(MTNC)(BCA)21UCAC61 C# and .Net Programming.pdf(MTNC)(BCA)
21UCAC61 C# and .Net Programming.pdf(MTNC)(BCA)ssuser7f90ae
 
C# vs Java What are The Differences.pdf
C# vs Java What are The Differences.pdfC# vs Java What are The Differences.pdf
C# vs Java What are The Differences.pdfchristiemarie4
 
DotNet Fundamentals
DotNet FundamentalsDotNet Fundamentals
DotNet FundamentalsMajdi SAIBI
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming LanguageRamaBoya2
 
Migrating From Cpp To C Sharp
Migrating From Cpp To C SharpMigrating From Cpp To C Sharp
Migrating From Cpp To C SharpGanesh Samarthyam
 
Advance C# Programming Part 1.pptx
Advance C# Programming Part 1.pptxAdvance C# Programming Part 1.pptx
Advance C# Programming Part 1.pptxpercivalfernandez3
 
Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)John Smith
 
Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)Wes Yanaga
 
Advance C# Programming Part 1.pdf
Advance C# Programming Part 1.pdfAdvance C# Programming Part 1.pdf
Advance C# Programming Part 1.pdfpercivalfernandez2
 

Ähnlich wie C# programming language (20)

C# chap 1
C# chap 1C# chap 1
C# chap 1
 
C sharp chap1
C sharp chap1C sharp chap1
C sharp chap1
 
Event Driven Programming in C#.docx
Event Driven Programming in C#.docxEvent Driven Programming in C#.docx
Event Driven Programming in C#.docx
 
programming in c#.ppt
programming in c#.pptprogramming in c#.ppt
programming in c#.ppt
 
21UCAC61 C# and .Net Programming.pdf(MTNC)(BCA)
21UCAC61 C# and .Net Programming.pdf(MTNC)(BCA)21UCAC61 C# and .Net Programming.pdf(MTNC)(BCA)
21UCAC61 C# and .Net Programming.pdf(MTNC)(BCA)
 
Presentation1
Presentation1Presentation1
Presentation1
 
C# handout.docx
C# handout.docxC# handout.docx
C# handout.docx
 
C-sharping.docx
C-sharping.docxC-sharping.docx
C-sharping.docx
 
C#
C#C#
C#
 
C# vs Java What are The Differences.pdf
C# vs Java What are The Differences.pdfC# vs Java What are The Differences.pdf
C# vs Java What are The Differences.pdf
 
C#
C#C#
C#
 
DotNet Fundamentals
DotNet FundamentalsDotNet Fundamentals
DotNet Fundamentals
 
C#
C#C#
C#
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
 
Migrating From Cpp To C Sharp
Migrating From Cpp To C SharpMigrating From Cpp To C Sharp
Migrating From Cpp To C Sharp
 
C#.ppt
C#.pptC#.ppt
C#.ppt
 
Advance C# Programming Part 1.pptx
Advance C# Programming Part 1.pptxAdvance C# Programming Part 1.pptx
Advance C# Programming Part 1.pptx
 
Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)
 
Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)
 
Advance C# Programming Part 1.pdf
Advance C# Programming Part 1.pdfAdvance C# Programming Part 1.pdf
Advance C# Programming Part 1.pdf
 

Kürzlich hochgeladen

USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinojohnmickonozaleda
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 

Kürzlich hochgeladen (20)

USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipino
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 

C# programming language

  • 2. What is C#?  It is a computer-programming language developed by Microsoft Corporation, USA.  It is fully object-oriented language.  Suitable for developing Web-based applications  Designed for developing robust, reliable & durable components to handle real-world applications.
  • 3. Highlights of C#  Derived from C/C++ family.  It simplifies & modernizes C++.  It is only component oriented language available today.  It is a language designed for the .NET Framework.  It is a concise, lean & modern language.  It combines the best features of many commonly used languages: the productivity of VB, the power of C++, & the elegance of Java.  It is intrinsically object-oriented & web-enabled.  It has a lean & consistent syntax.  It is simple, robust & productive.  Major parts of .NET Framework are actually coded in C#.
  • 4. Why C# ?????  The primary motivation while developing any language is the concern that it able to handle the increasing complexity of programs that are robust, durable & maintainable.  The history of major languages developed is as follows: BPCL B C C++ ANSI C Oak Java ANSI C++ C# 1967 1970 1972 1983 1987 1991 1995 1996 2000 Dennis Ritchie Bjarne Stroustrup ANSI Committee James Gostling Sun MicroSystems ANSI Committe Microsoft Martin Richards Ken Thompson
  • 5. Continue….  C & C++ languages suffer from a number of shortcomings in meeting World Wide Web requirements & standards.  Some are as follows: 1. The high complexity of language 2. They are not truly object oriented 3. They have poor type safety 4. They are not suitable for working with new web technologies. 5. They do not support versioning 6. They are weak in consistency 7. Their poor compatibility with the existing systems  VB, a language promoted by Microsoft for overcoming these problems, is not truly object- oriented and becomes increasingly difficult to use when systems become large.  Java which is truly object- oriented has not retained some powerful C++ features such as operator overloading.  Java also lacks inter-operability with code developed in other languages.  Microsoft therefore decided to design a new language.  The result is C#, a simple & modern language that directly addresses the needs of component-based software development.
  • 6.  C# is a descendant of C++ which in turn is a descendant of C as illustrated below: C C++ Java C# VB Concept ProductivityElegance Concept Component Orientation Object Orentation Power
  • 7. Characteristics of C#  Simple  C# simplifies C++ by eliminating irksome operators such as ->, ::, and pointers.  C# treats integers & Boolean data types as entirely different types.  Consistent  C# supports an unified type system which eliminates the problem of varying ranges of integer types.  All types are treated as objects.  Modern  C# is called modern language because it supports:  Automatic garbage collection  Rich intrinsic model for error handling  Decimal data types for financial applications  Modern approach to debugging  Robust security model
  • 8. Continue….  Object-Oriented  C# is truly object-oriented. It supports:  Encapsulation  Inheritance  Polymorphism  Type-Safe  Type safety promotes robust programs.  C# incorporates number of type-safe measures:  All dynamically allocated objects & arrays are initialized to zero  Use of any uninitialized variables produces an error message by the compiler  C# supports automatic garbage collection  Version able  Making new versions of software modules work with the existing applications is known as versioning  C# provides support for versioning with the help of new & override keywords.
  • 9.  Compatible  C# enforces the .NET common language specifications & therefore allows inter-operation with other .NET languages  Interoperable  C# provides support for using COM objects, no matter what language was used to author them.  Flexible  We may declare certain classes & methods as ‘unsafe’ and then use pointers to manipulate them. Continue…
  • 10. How Does C# differs from Java ? 1. C# has more primitive data types 2. Arrays are declared differently in C# 3. C# supports struct type & Java does not 4. Java does not provide for operator overloading 5. C# provides for better versioning support than Java 6. C# provides static constructors for initialization 7. Java does not directly support enumerations 8. C# uses is operator instead of instanceof operator in Java 9. C# checks overflows uses checked statements 10. There is no labeled break statement in C#. The goto statement is used to achieve this. 11. In Java, the switch statement can have only integer expression, while C# supports either an integer or string expressions
  • 11. A Simple C# Program class SampleOne { public static void Main() { System.Console.WriteLine(“C# is sharper than C++”); } }  Executing the program  Save the above file with SampleOne.cs name  Compile as : csc SampleOne.cs  C# compiler compiles your code and create an executable file by name  SampleOne.exe  For executing the program, simply type in the name of the executable file at the command prompt.
  • 12. NAMESPACES System.Console.WriteLine();  Here System is a namespace in which the Console class is located.  This class can be accessed using the dot operator.  C# supports using directive that can be used to import the namespace System into the program. using System; class SampleTwo { public static void Main() { Console.WriteLine(“Hello World!!!”); } }
  • 13. Providing Interactive Input using System; class SampleEight { public static void Main(string[] args) { Console.Write(“Enter Your Name”); string name = Console.ReadLine(); Console.WriteLine(“Hello ”+name); } }