SlideShare a Scribd company logo
By: Shehrevar Davierwala 1
What is C#?
C# is a new computer-programming language developed by Microsoft Corporation, USA.
C# is a fully object-oriented language like Java and is the first Component-oriented language.
It has been designed to support the key features of .NET Framework.
It is simple, efficient, productive and type-safe language derived from the popular C and C++
languages.
C# is designed for building robust, reliable and durable components to handle real-world
applications.
Major highlights of C# are:
- It is a brand new language derived from the C/C++ family
- It simplifies and modernizes C++
- It is the only component-oriented language available today
- It is the only language designed for the .NET framework
- It is a concise, lean and modern language
- It combines the best features of many commonly used languages:
the productivity of Visual Basic, the power of C++ and the elegance of Java
- It is intrinsically object- oriented and web-enabled
- It has a lean and consistent syntax
- It embodies today’s concern for simplicity, productivity and robustness
- It will become the language of choice for .NET programming
-Major parts of .NET Framework are actually coded in C#
Applications of C#
- Console applications
- Windows applications
- Developing Windows controls
- Developing ASP.NET projects
- Creating Web controls
- Providing Web services
- Developing .NET component library
By: Shehrevar Davierwala 2
Characteristics of C#
The main design goal of C# was simplicity rather than pure power. C# fulfills the need for a
language that is easy to write, read and maintain and also provides the power and flexibility of
C++. The language that is designed for both computing & communications is characterized by
several key features.
Simple: C# simplifies C++ by eliminating operators such as ->,:: and pointers. C# treats integer
and Boolean data types as two entirely different types. This means that the use of = in place of
== in if statement will be caught by the compiler.
Consistent: C# supports an unified type system which eliminates the problem of varying ranges
of integer types. All types are treated as objects and developers can extend the type system
simply and easily.
Modern: C# is called a modern language due to a number of features it supports.
It supports
- Automatic garbage collection
-Rich intrinsic model for error handling
- Decimal data type for financial applications
- Modern approach to debugging and
- Robust security model
Object-Oriented: C# is truly object-oriented. It supports all the three tenets of object-oriented
systems.
– Encapsulation
- Inheritance
- Polymorphism
The entire C# class model is built on top of the Virtual Object System of the .NET framework.
In C#, everything is an object. There are no more global functions, variables and constants.
Type-Safe: Type-safe promotes robust programs. C# incorporates a number of type-safe
measures.
- all dynamically allocated objects and arrays are initialized to zero
- use of any uninitialized variables produces an error message by the compiler
- access to arrays are range-checked and warned if it goes out-of-bounds
- C# does not permit unsafe casts
- C# enforces overflow checking in arithmetic operations
- Reference parameters that are passed are type-safe
By: Shehrevar Davierwala 3
- C# supports automatic garbage collection
Versionable: 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 and override
keywords. With this support, a programmer can guarantee that his new class library will
maintain binary compatibility with the existing client applications.
Compatible: C# enforces the .NET common language specifications and therefore allows inter-
operation with other .NET languages.
- C# provides support for transparent access to standard COM and OLE Automation.
- C# also permits interpolation with C-style APIs.
Flexible: Although C# does not support pointers, we may declare certain classes and methods as
‘unsafe’ and then use pointers to manipulate them. However, these codes will not be type-safe.
Inter-operability: C# provides support for using COM objects, no matter what language was
used to author them. C# also supports a special feature that enables a program to call out any
native API.
How does C# differ from C++?
1. C# compiles straight from source code to executable code, with no object files.
2. C# does not separate class definition from implementation.
3. In C#, class definition does not use a semicolon at the end.
4. the first character of the Main() function is capitalized. The Main must return either int or
void type value.
5. C# does not support #include statement.
6. All data types in C# are inherited from the object super class and therefore they are
objects.
7. all the basic value types will have the same size on any system.
8. In C#, data types belong to either value types or reference types.
9. C# checks for uninitialized variables and gives error messages at compile time.
10.In c#, structs are value types.
11.C# declares null as a keyword and considers it as an intrinsic value.
12.C# permits declaration of variables between goto and label.
13.C# does not support default arguments
By: Shehrevar Davierwala 4
C++ features dropped
a. Macros
b. Multiple Inheritance
c. Templates
d. Pointers
e. Global variables
f. Typedef statement
g. Default arguments
h. Constant member functions or parameters
i. forward declaration of classes
Enhancements to C++
1. Automatic garbage collection
2. Versioning support
3. strict type-safety
4. properties to access data members
5. delegates and events
6. boxing and unboxing
7. web services
How does C# Differ from Java?
1. C# compiler produces an executable code.
2. . C# has more primitive data types.
3. Unlike java , all C# data types are objects.
4. Arrays are declared differently in C#.
5. Java uses static final to declare a class constant while C# uses const.
6. C# supports the struct type and Java does not.
7. Java does not provide for operator overloading.
By: Shehrevar Davierwala 5
8. The new modifier used for class members has no complement in Java.
9. C# provides better versioning support than Java.
10. C# provides static constructors for initialization.
11. C# includes native support for properties, Java does not.
12. Java does not directly support enumerations.
13. C# checks overflows using checked statements.
14. C# uses is operator instead of intanceof operator in Java.
15. C# allows a variable number of parameters using the params keyword.

More Related Content

What's hot

Dot net
Dot netDot net
Dot net
public
 
Presentation1
Presentation1Presentation1
Presentation1
Nadine Mourad
 
Introduction to C# Programming
Introduction to C# ProgrammingIntroduction to C# Programming
Introduction to C# Programming
Sherwin Banaag Sapin
 
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
 
Introduction To C#
Introduction To C#Introduction To C#
Introduction To C#
rahulsahay19
 
Summer Training Project On C++
Summer Training Project On  C++Summer Training Project On  C++
Summer Training Project On C++
KAUSHAL KUMAR JHA
 
C and objective-C
 C  and  objective-C C  and  objective-C
C and objective-C
Vikas Pandey
 
Objective-C with respect to C# and Java
Objective-C with respect to C# and JavaObjective-C with respect to C# and Java
Objective-C with respect to C# and Java
Babul Mirdha
 
Swift programming language
Swift programming languageSwift programming language
Swift programming language
Nijo Job
 
Programming in c#
Programming in c#Programming in c#
Programming in c#
Shehrevar Davierwala
 
C#
C#C#
3.0 Introduction to .NET Framework
3.0 Introduction to .NET Framework3.0 Introduction to .NET Framework
3.0 Introduction to .NET Framework
Abdelrahman Hosny
 
Tutorial csharp
Tutorial csharpTutorial csharp
Tutorial csharp
Satish Verma
 
Swift language seminar topic
Swift language seminar topicSwift language seminar topic
Swift language seminar topic
Hyacinth Okeke
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
RamaBoya2
 
Introduction to .NET by QuontraSolutions
Introduction to .NET by QuontraSolutionsIntroduction to .NET by QuontraSolutions
Introduction to .NET by QuontraSolutions
QUONTRASOLUTIONS
 
What is c#
What is c#What is c#
What is c#
shwet18
 
C Programming language - introduction
C Programming  language - introduction  C Programming  language - introduction
C Programming language - introduction
GopikaS12
 
Training report of C language
Training report of C languageTraining report of C language
Training report of C language
Shashank Kapoor
 
c#.Net Windows application
c#.Net Windows application c#.Net Windows application
c#.Net Windows application
veera
 

What's hot (20)

Dot net
Dot netDot net
Dot net
 
Presentation1
Presentation1Presentation1
Presentation1
 
Introduction to C# Programming
Introduction to C# ProgrammingIntroduction to C# Programming
Introduction to C# Programming
 
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)
 
Introduction To C#
Introduction To C#Introduction To C#
Introduction To C#
 
Summer Training Project On C++
Summer Training Project On  C++Summer Training Project On  C++
Summer Training Project On C++
 
C and objective-C
 C  and  objective-C C  and  objective-C
C and objective-C
 
Objective-C with respect to C# and Java
Objective-C with respect to C# and JavaObjective-C with respect to C# and Java
Objective-C with respect to C# and Java
 
Swift programming language
Swift programming languageSwift programming language
Swift programming language
 
Programming in c#
Programming in c#Programming in c#
Programming in c#
 
C#
C#C#
C#
 
3.0 Introduction to .NET Framework
3.0 Introduction to .NET Framework3.0 Introduction to .NET Framework
3.0 Introduction to .NET Framework
 
Tutorial csharp
Tutorial csharpTutorial csharp
Tutorial csharp
 
Swift language seminar topic
Swift language seminar topicSwift language seminar topic
Swift language seminar topic
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
 
Introduction to .NET by QuontraSolutions
Introduction to .NET by QuontraSolutionsIntroduction to .NET by QuontraSolutions
Introduction to .NET by QuontraSolutions
 
What is c#
What is c#What is c#
What is c#
 
C Programming language - introduction
C Programming  language - introduction  C Programming  language - introduction
C Programming language - introduction
 
Training report of C language
Training report of C languageTraining report of C language
Training report of C language
 
c#.Net Windows application
c#.Net Windows application c#.Net Windows application
c#.Net Windows application
 

Viewers also liked

การโปรแกรมภาษาซีชาร์ป
การโปรแกรมภาษาซีชาร์ปการโปรแกรมภาษาซีชาร์ป
การโปรแกรมภาษาซีชาร์ป
KruBeeKa
 
C# chap 10
C# chap 10C# chap 10
C# programs
C# programsC# programs
12 exception handling
12 exception handling12 exception handling
12 exception handling
Arriz San Juan
 
Tech talk webtech
Tech talk webtechTech talk webtech
Tech talk webtech
Shehrevar Davierwala
 
Introduction To C#
Introduction To C#Introduction To C#
Introduction To C#
SAMIR BHOGAYTA
 
C# Tutorial
C# Tutorial C# Tutorial
C# Tutorial
Jm Ramos
 
C# basics
 C# basics C# basics
C# basics
Dinesh kumar
 
C# Exceptions Handling
C# Exceptions Handling C# Exceptions Handling
C# Exceptions Handling
sharqiyem
 

Viewers also liked (9)

การโปรแกรมภาษาซีชาร์ป
การโปรแกรมภาษาซีชาร์ปการโปรแกรมภาษาซีชาร์ป
การโปรแกรมภาษาซีชาร์ป
 
C# chap 10
C# chap 10C# chap 10
C# chap 10
 
C# programs
C# programsC# programs
C# programs
 
12 exception handling
12 exception handling12 exception handling
12 exception handling
 
Tech talk webtech
Tech talk webtechTech talk webtech
Tech talk webtech
 
Introduction To C#
Introduction To C#Introduction To C#
Introduction To C#
 
C# Tutorial
C# Tutorial C# Tutorial
C# Tutorial
 
C# basics
 C# basics C# basics
C# basics
 
C# Exceptions Handling
C# Exceptions Handling C# Exceptions Handling
C# Exceptions Handling
 

Similar to C# chap 1

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
 
Event Driven Programming in C#.docx
Event Driven Programming in C#.docxEvent Driven Programming in C#.docx
Event Driven Programming in C#.docx
LenchoMamudeBaro
 
programming in c#.ppt
programming in c#.pptprogramming in c#.ppt
programming in c#.ppt
NalinaKumari2
 
C-sharping.docx
C-sharping.docxC-sharping.docx
C-sharping.docx
LenchoMamudeBaro
 
C# handout.docx
C# handout.docxC# handout.docx
C# handout.docx
LenchoMamudeBaro
 
C#.ppt
C#.pptC#.ppt
C#
C#C#
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
 
Migrating From Cpp To C Sharp
Migrating From Cpp To C SharpMigrating From Cpp To C Sharp
Migrating From Cpp To C Sharp
Ganesh Samarthyam
 
C# c# for beginners crash course master c# programming fast and easy today
C# c# for beginners crash course master c# programming fast and easy todayC# c# for beginners crash course master c# programming fast and easy today
C# c# for beginners crash course master c# programming fast and easy today
Afonso Macedo
 
C#
C#C#
Introduction to programming using c
Introduction to programming using cIntroduction to programming using c
Introduction to programming using c
Reham Maher El-Safarini
 
Features provided by c#
Features provided by c#Features provided by c#
Features provided by c#
Self-employed
 
Summer training PPT Manasv Singharia.pptx
Summer training PPT Manasv Singharia.pptxSummer training PPT Manasv Singharia.pptx
Summer training PPT Manasv Singharia.pptx
shokeenk14
 
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
christiemarie4
 
10 Sep08 2003ver
10 Sep08 2003ver10 Sep08 2003ver
10 Sep08 2003ver
Kumton Suttiraksiri
 
C#
C#C#
Chapter-1 C#.pptx
Chapter-1 C#.pptxChapter-1 C#.pptx
Chapter-1 C#.pptx
faarax4
 
DotNet Fundamentals
DotNet FundamentalsDotNet Fundamentals
DotNet Fundamentals
Majdi SAIBI
 
Unit 1 of c++ part 1 basic introduction
Unit 1 of c++ part 1 basic introductionUnit 1 of c++ part 1 basic introduction
Unit 1 of c++ part 1 basic introduction
AKR Education
 

Similar to C# chap 1 (20)

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)
 
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
 
C-sharping.docx
C-sharping.docxC-sharping.docx
C-sharping.docx
 
C# handout.docx
C# handout.docxC# handout.docx
C# handout.docx
 
C#.ppt
C#.pptC#.ppt
C#.ppt
 
C#
C#C#
C#
 
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)
 
Migrating From Cpp To C Sharp
Migrating From Cpp To C SharpMigrating From Cpp To C Sharp
Migrating From Cpp To C Sharp
 
C# c# for beginners crash course master c# programming fast and easy today
C# c# for beginners crash course master c# programming fast and easy todayC# c# for beginners crash course master c# programming fast and easy today
C# c# for beginners crash course master c# programming fast and easy today
 
C#
C#C#
C#
 
Introduction to programming using c
Introduction to programming using cIntroduction to programming using c
Introduction to programming using c
 
Features provided by c#
Features provided by c#Features provided by c#
Features provided by c#
 
Summer training PPT Manasv Singharia.pptx
Summer training PPT Manasv Singharia.pptxSummer training PPT Manasv Singharia.pptx
Summer training PPT Manasv Singharia.pptx
 
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
 
10 Sep08 2003ver
10 Sep08 2003ver10 Sep08 2003ver
10 Sep08 2003ver
 
C#
C#C#
C#
 
Chapter-1 C#.pptx
Chapter-1 C#.pptxChapter-1 C#.pptx
Chapter-1 C#.pptx
 
DotNet Fundamentals
DotNet FundamentalsDotNet Fundamentals
DotNet Fundamentals
 
Unit 1 of c++ part 1 basic introduction
Unit 1 of c++ part 1 basic introductionUnit 1 of c++ part 1 basic introduction
Unit 1 of c++ part 1 basic introduction
 

More from Shehrevar Davierwala

Introduction_Swift
Introduction_SwiftIntroduction_Swift
Introduction_Swift
Shehrevar Davierwala
 
PsudoCode.pptx
PsudoCode.pptxPsudoCode.pptx
PsudoCode.pptx
Shehrevar Davierwala
 
Number System.pptx
Number System.pptxNumber System.pptx
Number System.pptx
Shehrevar Davierwala
 
Java Script (Module 1).pptx
Java Script (Module 1).pptxJava Script (Module 1).pptx
Java Script (Module 1).pptx
Shehrevar Davierwala
 
Website in Clicks Day 2
Website in Clicks Day 2Website in Clicks Day 2
Website in Clicks Day 2
Shehrevar Davierwala
 
Develop Website in Clicks
Develop Website in ClicksDevelop Website in Clicks
Develop Website in Clicks
Shehrevar Davierwala
 
Build Virtual Assistant Using AI
Build Virtual Assistant Using AI Build Virtual Assistant Using AI
Build Virtual Assistant Using AI
Shehrevar Davierwala
 
Build brand reputation using facebook
Build brand reputation using facebookBuild brand reputation using facebook
Build brand reputation using facebook
Shehrevar Davierwala
 
Digital Marketing Session 2
Digital Marketing Session 2Digital Marketing Session 2
Digital Marketing Session 2
Shehrevar Davierwala
 
Learn Digital Marketing : 0 to Hero Day 1
Learn Digital Marketing :  0 to Hero Day 1 Learn Digital Marketing :  0 to Hero Day 1
Learn Digital Marketing : 0 to Hero Day 1
Shehrevar Davierwala
 
Standard template
Standard templateStandard template
Standard template
Shehrevar Davierwala
 
Digital Marketing for Sustainable Business - Afghan Perspective
Digital Marketing for Sustainable Business - Afghan Perspective  Digital Marketing for Sustainable Business - Afghan Perspective
Digital Marketing for Sustainable Business - Afghan Perspective
Shehrevar Davierwala
 
Developing stunning website in clicks - 2
Developing stunning website in clicks - 2Developing stunning website in clicks - 2
Developing stunning website in clicks - 2
Shehrevar Davierwala
 
Developing stunning website in clicks
Developing stunning website in clicksDeveloping stunning website in clicks
Developing stunning website in clicks
Shehrevar Davierwala
 
Google forms for data analysis
Google forms for data analysisGoogle forms for data analysis
Google forms for data analysis
Shehrevar Davierwala
 
Webdesign session1
Webdesign session1Webdesign session1
Webdesign session1
Shehrevar Davierwala
 
Tech talk php_cms
Tech talk php_cmsTech talk php_cms
Tech talk php_cms
Shehrevar Davierwala
 
Ph pbasics
Ph pbasicsPh pbasics
Php mysql
Php mysqlPhp mysql
Java operators
Java operatorsJava operators
Java operators
Shehrevar Davierwala
 

More from Shehrevar Davierwala (20)

Introduction_Swift
Introduction_SwiftIntroduction_Swift
Introduction_Swift
 
PsudoCode.pptx
PsudoCode.pptxPsudoCode.pptx
PsudoCode.pptx
 
Number System.pptx
Number System.pptxNumber System.pptx
Number System.pptx
 
Java Script (Module 1).pptx
Java Script (Module 1).pptxJava Script (Module 1).pptx
Java Script (Module 1).pptx
 
Website in Clicks Day 2
Website in Clicks Day 2Website in Clicks Day 2
Website in Clicks Day 2
 
Develop Website in Clicks
Develop Website in ClicksDevelop Website in Clicks
Develop Website in Clicks
 
Build Virtual Assistant Using AI
Build Virtual Assistant Using AI Build Virtual Assistant Using AI
Build Virtual Assistant Using AI
 
Build brand reputation using facebook
Build brand reputation using facebookBuild brand reputation using facebook
Build brand reputation using facebook
 
Digital Marketing Session 2
Digital Marketing Session 2Digital Marketing Session 2
Digital Marketing Session 2
 
Learn Digital Marketing : 0 to Hero Day 1
Learn Digital Marketing :  0 to Hero Day 1 Learn Digital Marketing :  0 to Hero Day 1
Learn Digital Marketing : 0 to Hero Day 1
 
Standard template
Standard templateStandard template
Standard template
 
Digital Marketing for Sustainable Business - Afghan Perspective
Digital Marketing for Sustainable Business - Afghan Perspective  Digital Marketing for Sustainable Business - Afghan Perspective
Digital Marketing for Sustainable Business - Afghan Perspective
 
Developing stunning website in clicks - 2
Developing stunning website in clicks - 2Developing stunning website in clicks - 2
Developing stunning website in clicks - 2
 
Developing stunning website in clicks
Developing stunning website in clicksDeveloping stunning website in clicks
Developing stunning website in clicks
 
Google forms for data analysis
Google forms for data analysisGoogle forms for data analysis
Google forms for data analysis
 
Webdesign session1
Webdesign session1Webdesign session1
Webdesign session1
 
Tech talk php_cms
Tech talk php_cmsTech talk php_cms
Tech talk php_cms
 
Ph pbasics
Ph pbasicsPh pbasics
Ph pbasics
 
Php mysql
Php mysqlPhp mysql
Php mysql
 
Java operators
Java operatorsJava operators
Java operators
 

Recently uploaded

June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 

Recently uploaded (20)

June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 

C# chap 1

  • 1. By: Shehrevar Davierwala 1 What is C#? C# is a new computer-programming language developed by Microsoft Corporation, USA. C# is a fully object-oriented language like Java and is the first Component-oriented language. It has been designed to support the key features of .NET Framework. It is simple, efficient, productive and type-safe language derived from the popular C and C++ languages. C# is designed for building robust, reliable and durable components to handle real-world applications. Major highlights of C# are: - It is a brand new language derived from the C/C++ family - It simplifies and modernizes C++ - It is the only component-oriented language available today - It is the only language designed for the .NET framework - It is a concise, lean and modern language - It combines the best features of many commonly used languages: the productivity of Visual Basic, the power of C++ and the elegance of Java - It is intrinsically object- oriented and web-enabled - It has a lean and consistent syntax - It embodies today’s concern for simplicity, productivity and robustness - It will become the language of choice for .NET programming -Major parts of .NET Framework are actually coded in C# Applications of C# - Console applications - Windows applications - Developing Windows controls - Developing ASP.NET projects - Creating Web controls - Providing Web services - Developing .NET component library
  • 2. By: Shehrevar Davierwala 2 Characteristics of C# The main design goal of C# was simplicity rather than pure power. C# fulfills the need for a language that is easy to write, read and maintain and also provides the power and flexibility of C++. The language that is designed for both computing & communications is characterized by several key features. Simple: C# simplifies C++ by eliminating operators such as ->,:: and pointers. C# treats integer and Boolean data types as two entirely different types. This means that the use of = in place of == in if statement will be caught by the compiler. Consistent: C# supports an unified type system which eliminates the problem of varying ranges of integer types. All types are treated as objects and developers can extend the type system simply and easily. Modern: C# is called a modern language due to a number of features it supports. It supports - Automatic garbage collection -Rich intrinsic model for error handling - Decimal data type for financial applications - Modern approach to debugging and - Robust security model Object-Oriented: C# is truly object-oriented. It supports all the three tenets of object-oriented systems. – Encapsulation - Inheritance - Polymorphism The entire C# class model is built on top of the Virtual Object System of the .NET framework. In C#, everything is an object. There are no more global functions, variables and constants. Type-Safe: Type-safe promotes robust programs. C# incorporates a number of type-safe measures. - all dynamically allocated objects and arrays are initialized to zero - use of any uninitialized variables produces an error message by the compiler - access to arrays are range-checked and warned if it goes out-of-bounds - C# does not permit unsafe casts - C# enforces overflow checking in arithmetic operations - Reference parameters that are passed are type-safe
  • 3. By: Shehrevar Davierwala 3 - C# supports automatic garbage collection Versionable: 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 and override keywords. With this support, a programmer can guarantee that his new class library will maintain binary compatibility with the existing client applications. Compatible: C# enforces the .NET common language specifications and therefore allows inter- operation with other .NET languages. - C# provides support for transparent access to standard COM and OLE Automation. - C# also permits interpolation with C-style APIs. Flexible: Although C# does not support pointers, we may declare certain classes and methods as ‘unsafe’ and then use pointers to manipulate them. However, these codes will not be type-safe. Inter-operability: C# provides support for using COM objects, no matter what language was used to author them. C# also supports a special feature that enables a program to call out any native API. How does C# differ from C++? 1. C# compiles straight from source code to executable code, with no object files. 2. C# does not separate class definition from implementation. 3. In C#, class definition does not use a semicolon at the end. 4. the first character of the Main() function is capitalized. The Main must return either int or void type value. 5. C# does not support #include statement. 6. All data types in C# are inherited from the object super class and therefore they are objects. 7. all the basic value types will have the same size on any system. 8. In C#, data types belong to either value types or reference types. 9. C# checks for uninitialized variables and gives error messages at compile time. 10.In c#, structs are value types. 11.C# declares null as a keyword and considers it as an intrinsic value. 12.C# permits declaration of variables between goto and label. 13.C# does not support default arguments
  • 4. By: Shehrevar Davierwala 4 C++ features dropped a. Macros b. Multiple Inheritance c. Templates d. Pointers e. Global variables f. Typedef statement g. Default arguments h. Constant member functions or parameters i. forward declaration of classes Enhancements to C++ 1. Automatic garbage collection 2. Versioning support 3. strict type-safety 4. properties to access data members 5. delegates and events 6. boxing and unboxing 7. web services How does C# Differ from Java? 1. C# compiler produces an executable code. 2. . C# has more primitive data types. 3. Unlike java , all C# data types are objects. 4. Arrays are declared differently in C#. 5. Java uses static final to declare a class constant while C# uses const. 6. C# supports the struct type and Java does not. 7. Java does not provide for operator overloading.
  • 5. By: Shehrevar Davierwala 5 8. The new modifier used for class members has no complement in Java. 9. C# provides better versioning support than Java. 10. C# provides static constructors for initialization. 11. C# includes native support for properties, Java does not. 12. Java does not directly support enumerations. 13. C# checks overflows using checked statements. 14. C# uses is operator instead of intanceof operator in Java. 15. C# allows a variable number of parameters using the params keyword.