SlideShare a Scribd company logo
C # Language
Presented By: AKANKSHA SHUKLA
CONETNTS
• The language
• Syntax
• Program Structure
• Variable and data types
• Assignment and initialization
• Examples of declaration
• Distinguishing features
• Advantage over C++ and Java
The Language
• The C# language is intended to be a simple, modern,
general-purpose, object-oriented programming language.
• C#'s principal designer and lead architect at Microsoft
is Anders Hejlsberg
• Version and Platform:
In August 2012
C# 5.0 , .NET Framework 4.5, Visual Studio 2012
C# Syntax
• C# has the following syntax:
• ; are used to denote the end of a statement.
• { } are used to group statements like methods
(functions), methods into classes, and classes
into namespaces.
• Variables are assigned using an =, but compared
using ==.
• [ ] are used with arrays, both to declare them and
to get a value at a given index in one of them.
C# - Program Structure
A C# program basically consists of the following
parts:
• Namespace declaration
• A class
• Class methods
• Class attributes
• A Main method
• Statements & Expressions
• Comments
Variables & Data Types in C#
Byte String
Short Object
Int Bool
Long Decimal
Float Char
Double
• <data_type> <variable_list>;
• variable_name = value;
Examples of Declarations
Int myNumber = 20;
String myName = “Sygnet”;
String[ ] name = new string[20];
Int[ ,] score = new int [5,3] ;
Initializing variable
with 20
Initializing
array of string type
Initializing
array with (5 x 3)
Hello program
Distinguishing features
• C# supports strongly typed implicit variable
keyword var.
• C# is platform dependent.
• C# has strongly typed and verbose function
pointer support via the keyword delegate
• A C# namespace provides the same level of
code isolation
• C# supports a strict Boolean data type, bool.
• Garbage collection addresses the problem
of memory leaks.
Distinguishing features Contd…
• C#, unlike Java, supports Method overloading.
• C# supports enumeration.
• C# supports Genrics.
• C# supports optional parameter.
C# language
C# programming language is used in
• ASP.NET or web services
• Windows GUI application
Advantages over C++ and java
• Formalized concept of get-set methods, so the
code becomes more legible
• More clean events management (using
delegates)
C# language

More Related Content

PPTX
Introduction to C# Programming
PPTX
Introduction To C#
PPTX
C# Tutorial
PPTX
Introduction to c#
PPTX
C# programming language
PPTX
C# 101: Intro to Programming with C#
PPT
C# Exceptions Handling
PPT
C#.NET
Introduction to C# Programming
Introduction To C#
C# Tutorial
Introduction to c#
C# programming language
C# 101: Intro to Programming with C#
C# Exceptions Handling
C#.NET

What's hot (20)

PPSX
Introduction to .net framework
PPT
PDF
Java variable types
PPTX
Core java complete ppt(note)
PPT
C sharp
PPT
C# Basics
PPTX
PDF
Introduction to Java Programming Language
PPTX
C# in depth
PPSX
Introduction to Java
PPT
C# basics
PPTX
Common language runtime clr
PPTX
dot net technology
PPT
SQLITE Android
PDF
Learn C# Programming - Decision Making & Loops
PPTX
CSharp Presentation
PPTX
Unit Testing And Mocking
PPTX
C# classes objects
PPT
Learning typescript
PPT
Introduction To C#
Introduction to .net framework
Java variable types
Core java complete ppt(note)
C sharp
C# Basics
Introduction to Java Programming Language
C# in depth
Introduction to Java
C# basics
Common language runtime clr
dot net technology
SQLITE Android
Learn C# Programming - Decision Making & Loops
CSharp Presentation
Unit Testing And Mocking
C# classes objects
Learning typescript
Introduction To C#
Ad

Viewers also liked (11)

PPTX
Tom van Ees - Academic and Commercial software Development
PPT
Csharp4 arrays and_tuples
PDF
Secure mvc application saineshwar
PPT
Csharp4 delegates lambda_and_events
PPT
Whats New In C# 3.0
PDF
Free MVC project to learn for beginners.
PPT
Csharp4 basics
PPTX
PPTX
Introduction to .NET Core & ASP.NET Core MVC
PPTX
Introduction to C# 6.0 and 7.0
PPTX
2.overview of c#
Tom van Ees - Academic and Commercial software Development
Csharp4 arrays and_tuples
Secure mvc application saineshwar
Csharp4 delegates lambda_and_events
Whats New In C# 3.0
Free MVC project to learn for beginners.
Csharp4 basics
Introduction to .NET Core & ASP.NET Core MVC
Introduction to C# 6.0 and 7.0
2.overview of c#
Ad

Similar to C# language (20)

DOCX
C-sharping.docx
PPTX
1. Introduction to C# Programming Langua
PDF
A tour of C# - Overview _ Microsoft Learn.pdf
PDF
2.Getting Started with C#.Net-(C#)
DOCX
C# handout.docx
PPTX
C# AND F#
PPTX
c# at f#
PPTX
Introduction to C#.pptx for all BSIT students
DOCX
Event Driven Programming in C#.docx
PDF
Introduction of c# day3
PPTX
A POWERPOINT PRESENTATION ABOUT INTRODUCTION TO C#
PDF
L2 C# Programming Comments, Keywords, Identifiers, Variables.pdf
PDF
C sharp chap1
PDF
PPTX
LEARN C# PROGRAMMING WITH GMT
PDF
Lesson 1 INTRODUCTION TO C# LANGUAGE.pdf
PPT
Presentatiooooooooooon00000000000001.ppt
DOCX
Unit 1 question and answer
PPTX
C # (C Sharp).pptx
C-sharping.docx
1. Introduction to C# Programming Langua
A tour of C# - Overview _ Microsoft Learn.pdf
2.Getting Started with C#.Net-(C#)
C# handout.docx
C# AND F#
c# at f#
Introduction to C#.pptx for all BSIT students
Event Driven Programming in C#.docx
Introduction of c# day3
A POWERPOINT PRESENTATION ABOUT INTRODUCTION TO C#
L2 C# Programming Comments, Keywords, Identifiers, Variables.pdf
C sharp chap1
LEARN C# PROGRAMMING WITH GMT
Lesson 1 INTRODUCTION TO C# LANGUAGE.pdf
Presentatiooooooooooon00000000000001.ppt
Unit 1 question and answer
C # (C Sharp).pptx

Recently uploaded (20)

PPTX
Spectroscopy.pptx food analysis technology
PDF
Empathic Computing: Creating Shared Understanding
PDF
Machine learning based COVID-19 study performance prediction
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
cuic standard and advanced reporting.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Spectroscopy.pptx food analysis technology
Empathic Computing: Creating Shared Understanding
Machine learning based COVID-19 study performance prediction
The Rise and Fall of 3GPP – Time for a Sabbatical?
Per capita expenditure prediction using model stacking based on satellite ima...
“AI and Expert System Decision Support & Business Intelligence Systems”
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Approach and Philosophy of On baking technology
Mobile App Security Testing_ A Comprehensive Guide.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Chapter 3 Spatial Domain Image Processing.pdf
cuic standard and advanced reporting.pdf
Network Security Unit 5.pdf for BCA BBA.
MIND Revenue Release Quarter 2 2025 Press Release
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Understanding_Digital_Forensics_Presentation.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton

C# language

  • 1. C # Language Presented By: AKANKSHA SHUKLA
  • 2. CONETNTS • The language • Syntax • Program Structure • Variable and data types • Assignment and initialization • Examples of declaration • Distinguishing features • Advantage over C++ and Java
  • 3. The Language • The C# language is intended to be a simple, modern, general-purpose, object-oriented programming language. • C#'s principal designer and lead architect at Microsoft is Anders Hejlsberg • Version and Platform: In August 2012 C# 5.0 , .NET Framework 4.5, Visual Studio 2012
  • 4. C# Syntax • C# has the following syntax: • ; are used to denote the end of a statement. • { } are used to group statements like methods (functions), methods into classes, and classes into namespaces. • Variables are assigned using an =, but compared using ==. • [ ] are used with arrays, both to declare them and to get a value at a given index in one of them.
  • 5. C# - Program Structure A C# program basically consists of the following parts: • Namespace declaration • A class • Class methods • Class attributes • A Main method • Statements & Expressions • Comments
  • 6. Variables & Data Types in C# Byte String Short Object Int Bool Long Decimal Float Char Double • <data_type> <variable_list>; • variable_name = value;
  • 7. Examples of Declarations Int myNumber = 20; String myName = “Sygnet”; String[ ] name = new string[20]; Int[ ,] score = new int [5,3] ; Initializing variable with 20 Initializing array of string type Initializing array with (5 x 3)
  • 9. Distinguishing features • C# supports strongly typed implicit variable keyword var. • C# is platform dependent. • C# has strongly typed and verbose function pointer support via the keyword delegate • A C# namespace provides the same level of code isolation • C# supports a strict Boolean data type, bool. • Garbage collection addresses the problem of memory leaks.
  • 10. Distinguishing features Contd… • C#, unlike Java, supports Method overloading. • C# supports enumeration. • C# supports Genrics. • C# supports optional parameter.
  • 12. C# programming language is used in • ASP.NET or web services • Windows GUI application
  • 13. Advantages over C++ and java • Formalized concept of get-set methods, so the code becomes more legible • More clean events management (using delegates)