SlideShare a Scribd company logo
1 of 5
Download to read offline
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

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
 
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
 
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 (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

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
 
Summer training PPT Manasv Singharia.pptx
Summer training PPT Manasv Singharia.pptxSummer training PPT Manasv Singharia.pptx
Summer training PPT Manasv Singharia.pptx
shokeenk14
 

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

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

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Recently uploaded (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 

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.