SlideShare a Scribd company logo
1 of 20
Download to read offline
All Right Reserved@ aumcp group of annamalai university(Arun Singh)
Introduction of C#
Presented By
Arun Kumar Singh &Team
Master of Computer Application
Microsoft® Certified Professional
MCP id- 7802107
arunsingh026@hotmail.com
1
www.microsoft.mcp.com
7/30/20131
WHAT IS C#?
• C# (pronounced as ‘c sharp’) is a new computer programming language developed by
Microsoft Corporation,USA.
• C# is fully object oriented language like JAVA and is the first component-oriented
language
• Its development team is led by Anders Hejlsberg.
• It is a simple ,efficient language derived from the popular c and c++.
• Major parts of .NET framework is actually coded by C#
• The most recent version is C# 5.0, which was released on August 15, 2012.
• It is only component –oriented language available today.
• C# is combines with the best features of visual basic , C++, and java.
7/30/2013
All Right Reserved@ aumcp group of annamalai university(Arun Singh)
2
HISTORY …………………
• During the development of the .NET Framework, the class libraries were originally
written using a managed code compiler system called Simple Managed C (SMC)
• In January 1999,Anders Hejlsberg formed a team to build a new language at the time
called Cool, which stood for "C-like Object Oriented Language".
• Microsoft had considered keeping the name "Cool" as the final name of the language,
but chose not to do so for trademark reasons.
• By the time the .NET project was publicly announced at the July 2000 Professional
Developers Conference, (MCP conference) the language had been renamed C#, and the
class libraries and ASP.NET runtime had been ported to C#.
• James Gosling, who created the Java programming language in 1994, and Bill Joy, a co-
founder of Sun Microsystems, the originator of Java, called C# an "imitation" of Java;
Gosling further claimed that "[C# is] sort of Java with reliability, productivity and
security. Klaus Kraft and Angelika Langer (authors of a C++ streams book) stated in a
blog post that "Java and C# are almost identical programming languages. Hardly
anybody will claim that Java or C# are revolutionary programming languages that
changed the way we write programs," and "C# borrowed a lot from Java - and vice versa.
7/30/2013
All Right Reserved@ aumcp group of annamalai university(Arun Singh)
3
• Now that C# supports boxing and unboxing, we'll have a very similar feature in
Java.Anders Hejlsberg has argued that C# is "not a Java clone" and is "much closer to
C++" in its design.
Versions:
C# 1.0 January 2002 .NET Framework 1.0 Visual Studio .NET 2002
C# 1.2 April 2003 .NET Framework 1.1 Visual Studio .NET 2003
C# 2.0 November 2005 .NET Framework 2.0 Visual Studio 2005
.NET Framework 2.0 Visual Studio 2008
C# 3.0 November 2007 .NET Framework 3.0 Visual Studio 2010
.NET Framework 3.5
C# 4.0 April 2010 .NET Framework 4 Visual Studio 2010
C# 5.0 August 2012 .NET Framework 4.5 Visual Studio 2012
. 7/30/2013
All Right Reserved@ aumcp group of annamalai university(Arun Singh)4
EVOLUTION OF C#
C
C++
JAVA C# VB
Component
orientation
concept
ProductivityElegance
7/30/2013All Right Reserved@ aumcp group of annamalai university(Arun Singh)5
HOW DOES C# DIFFER FROM C++?
• As stated earlier, c# was derived from c++ to make it the language of choice for c and c++
Programmers.
• C# therefore shares major parts of syntax with c++.however , the c# designer introduce a
few changes in the syntax of C++ and removed a few features primarily to reduce the
common pitfalls that occurred in c++ program development.
• They also added a number of additional features to make C# a type safe and web enabled
language.
C++ features:
1. Macros
2. Multiple Inheritance
3. Templates
4. Pointers
5. GlobalVariable
6. Typedef statement
7. Default arguments
8. Constant member function or
parameter 7/30/2013
All Right Reserved@ aumcp group of annamalai university(Arun Singh)
6
Enhancement to C#.......
1. Automatic garbage collection
2. Version Support
3. Strict type safety
4. Properties to access data members
5. Delegates and events
6. Web services
and much more……………………
7/30/2013
All Right Reserved@ aumcp group of annamalai university(Arun Singh)
7
HOW DOES C# DIFFER FROM JAVA?
• Like c# ,JAVA was also derived from C++ and therefore they have similar roots.
Moreover, c# was developed by Microsoft as an alternative to java for web programming
.
• C# borrowed many goods features from JAVA, which has already become a popular
internet language.
• However, there exist a number of difference b/w c# and JAVA.
1. c# has more primitive data types than java.
2. Arrays are declared differtly in c# than java.
3. C# provides better versioning supports than java.
4. C# adds internal a new accessibility modifiers.
5. There is no labeled break statements in c#. The goto is used to achieve this
And much more…………
7/30/2013
All Right Reserved@ aumcp group of annamalai university(Arun Singh)
8
MY FIRST C# HELLO PROGRAM
using System;
class Samplefirst
{
public static void Main(string[] args)
{
Console.WriteLine("hello c#, i feeling great being with u");
}
}
7/30/2013
All Right Reserved@ aumcp group of annamalai university(Arun Singh)
9
7/30/2013
All Right Reserved@ aumcp group of annamalai university(Arun Singh)
10
USING:
The using keyboard are allowed to us to use the various classes and interface etc.
Which are define in respective Namespace.
EX--- using System; //default Namespace
System Console
(namespace) (class)
NOTE: using also contain a nested namespace.
using namespace1.namespace2;
a namespace2 which are define into a namespace1, so we define like that……………
EX---- using System.Collection;
7/30/2013
All Right Reserved@ aumcp group of annamalai university(Arun Singh)
11
The Namespace keyword:
Namespace is nothing but a logical collection of related classes.
The basic namespace of c# is System namespace. Which are contain all general classes and
interfaces, Methods, which are generally used in a program.
EX--- Namespace Class
using System.Console.WriteLine();
keyword Methods
Class:
The c# program are allow to you to define a at least one class in your program, which
Are build the main function.
7/30/2013
All Right Reserved@ aumcp group of annamalai university(Arun Singh)
12
Syntax
class <class-name>
{
main function()
{
// statements parts is there…………….
}
}
7/30/2013
All Right Reserved@ aumcp group of annamalai university(Arun Singh)
13
The Main() Function:
public static void Main(string args[])
• This is one of the standard signatures of the c# program. This methods act as entry point
of your program
• C# starts its execution from first line of your program and go for a end point of main
method .
• The keyword public is an access modifiers that tells that c# complier that main method can
accessible by anyone
• static- The main methods are design as a static, Why it is –it will called by a CLR
without making any object .
• void - The main method does not return any values.
• string args[] – is a parameter list which are passed into a command line arguments. And
taking a value in form of string. This is optional, but in java it is necessary.
• NOTE: the c# always take a value in form of String.
7/30/2013
All Right Reserved@ aumcp group of annamalai university(Arun Singh)
14
COMMENTS:
There are three kinds of comments, which are define into C#.
• Single line comment e.g. //
Similar in java
• Multi line comment e.g. /* */
• Documents /// but in java-> /**………….*/
class Program // here we define class
{
static void Main(string[] args)// this is main function
{/* there are stats in which in main function*/
Console.Write("hello c#");///lssjssdcks
///cksjcc
///cbkx
///xnx
///xdcjbs
}
}
7/30/2013
All Right Reserved@ aumcp group of annamalai university(Arun Singh)
15
SOME IMPORTANTS FACTS:
• White spaces are ignored
EX- class Program
{
static void Main(string[] args)
{
Console.Write("hello c#");
}
}
• Do not need to save your program.
• This is not necessary that main method contain the arguments ‘(string args[])’. It is
optional parameter. But in java is necessary to define a arguments.
static void Main()
{
Console.Write("hello c#");
}
7/30/2013
All Right Reserved@ aumcp group of annamalai university(Arun Singh)
16
MAIN RETURN A VALUE:
class sampletwo
{
static int Main(string[] args)
{
Console.Write("hello c#");
return 0;
}
NOTE: Another important aspect is the return type of Main().we have used void as the
return in earlier programs .Main() can also return a value if it is declare as int type instead of
void. When the return type in int, we must a return statement at the end of the method as
shown above program.
Return an integer type value to the system .the value return serve as the program termination
Status code
7/30/2013All Right Reserved@ aumcp group of annamalai university(Arun Singh)17
QUESTION REVIEW:
1. State at least five most important highlights of c# language.
2. How the c# better than java?
3. C# is modern language. Comment?
4. State five features of c++ that have not been incorporated into c#.
5. Explain the CLR?
6. State the software engineering phases, why it is important?
7. Why c# is very popular state one technical reason?
Next Conti………………..
7/30/2013
All Right Reserved@ aumcp group of annamalai university(Arun Singh)18
Q &A Session
More Information PostYour Questions on
www.aumcp2013.jimdo.com
aumcp2013@live.com
All Right Reserved@ aumcp group of annamalai university(Arun Singh)
7/30/201319
Thanks to All
All Right Reserved@ aumcp group of annamalai university(Arun Singh)
7/30/201320

More Related Content

What's hot

Language Engineering in the Cloud
Language Engineering in the CloudLanguage Engineering in the Cloud
Language Engineering in the Cloudlennartkats
 
Migrating From Cpp To C Sharp
Migrating From Cpp To C SharpMigrating From Cpp To C Sharp
Migrating From Cpp To C SharpGanesh Samarthyam
 
Single Sourcing RCP and RAP
Single Sourcing RCP and RAPSingle Sourcing RCP and RAP
Single Sourcing RCP and RAPChris Aniszczyk
 
Compilation of c
Compilation of cCompilation of c
Compilation of cWay2itech
 
Test-driven language development
Test-driven language developmentTest-driven language development
Test-driven language developmentlennartkats
 
The Larch - a visual interactive programming environment
The Larch - a visual interactive programming environmentThe Larch - a visual interactive programming environment
The Larch - a visual interactive programming environmentPython Ireland
 
Gwt and JSR 269's Pluggable Annotation Processing API
Gwt and JSR 269's Pluggable Annotation Processing APIGwt and JSR 269's Pluggable Annotation Processing API
Gwt and JSR 269's Pluggable Annotation Processing APIArnaud Tournier
 
Using Aspects for Language Portability (SCAM 2010)
Using Aspects for Language Portability (SCAM 2010)Using Aspects for Language Portability (SCAM 2010)
Using Aspects for Language Portability (SCAM 2010)lennartkats
 
Effective programming in Java - Kronospan Job Fair 2016
Effective programming in Java - Kronospan Job Fair 2016Effective programming in Java - Kronospan Job Fair 2016
Effective programming in Java - Kronospan Job Fair 2016Łukasz Koniecki
 
Java and effective programming. Is it possible? - IAESTE Case Week 2016
Java and effective programming. Is it possible? - IAESTE Case Week 2016Java and effective programming. Is it possible? - IAESTE Case Week 2016
Java and effective programming. Is it possible? - IAESTE Case Week 2016Łukasz Koniecki
 
Knowledge Sharing Session on JavaScript Source Maps & Angular Compilation
Knowledge Sharing Session on JavaScript Source Maps & Angular CompilationKnowledge Sharing Session on JavaScript Source Maps & Angular Compilation
Knowledge Sharing Session on JavaScript Source Maps & Angular CompilationMd.Zahidur Rahman
 
A journey with Target Platforms
A journey with Target PlatformsA journey with Target Platforms
A journey with Target PlatformsMickael Istria
 
The Spoofax Language Workbench (SPLASH 2010)
The Spoofax Language Workbench (SPLASH 2010)The Spoofax Language Workbench (SPLASH 2010)
The Spoofax Language Workbench (SPLASH 2010)lennartkats
 
Web programming UNIT II by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh MalothWeb programming UNIT II by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh MalothBhavsingh Maloth
 
Integrated Language Definition Testing: Enabling Test-Driven Language Develop...
Integrated Language Definition Testing: Enabling Test-Driven Language Develop...Integrated Language Definition Testing: Enabling Test-Driven Language Develop...
Integrated Language Definition Testing: Enabling Test-Driven Language Develop...lennartkats
 

What's hot (20)

Language Engineering in the Cloud
Language Engineering in the CloudLanguage Engineering in the Cloud
Language Engineering in the Cloud
 
Droidcon Summary 2021
Droidcon Summary 2021Droidcon Summary 2021
Droidcon Summary 2021
 
Migrating From Cpp To C Sharp
Migrating From Cpp To C SharpMigrating From Cpp To C Sharp
Migrating From Cpp To C Sharp
 
Single Sourcing RCP and RAP
Single Sourcing RCP and RAPSingle Sourcing RCP and RAP
Single Sourcing RCP and RAP
 
Compilation of c
Compilation of cCompilation of c
Compilation of c
 
Test-driven language development
Test-driven language developmentTest-driven language development
Test-driven language development
 
The Larch - a visual interactive programming environment
The Larch - a visual interactive programming environmentThe Larch - a visual interactive programming environment
The Larch - a visual interactive programming environment
 
Gwt and JSR 269's Pluggable Annotation Processing API
Gwt and JSR 269's Pluggable Annotation Processing APIGwt and JSR 269's Pluggable Annotation Processing API
Gwt and JSR 269's Pluggable Annotation Processing API
 
Using Aspects for Language Portability (SCAM 2010)
Using Aspects for Language Portability (SCAM 2010)Using Aspects for Language Portability (SCAM 2010)
Using Aspects for Language Portability (SCAM 2010)
 
C programming
C programming C programming
C programming
 
Effective programming in Java - Kronospan Job Fair 2016
Effective programming in Java - Kronospan Job Fair 2016Effective programming in Java - Kronospan Job Fair 2016
Effective programming in Java - Kronospan Job Fair 2016
 
Java and effective programming. Is it possible? - IAESTE Case Week 2016
Java and effective programming. Is it possible? - IAESTE Case Week 2016Java and effective programming. Is it possible? - IAESTE Case Week 2016
Java and effective programming. Is it possible? - IAESTE Case Week 2016
 
Knowledge Sharing Session on JavaScript Source Maps & Angular Compilation
Knowledge Sharing Session on JavaScript Source Maps & Angular CompilationKnowledge Sharing Session on JavaScript Source Maps & Angular Compilation
Knowledge Sharing Session on JavaScript Source Maps & Angular Compilation
 
C compilation process
C compilation processC compilation process
C compilation process
 
A journey with Target Platforms
A journey with Target PlatformsA journey with Target Platforms
A journey with Target Platforms
 
The Spoofax Language Workbench (SPLASH 2010)
The Spoofax Language Workbench (SPLASH 2010)The Spoofax Language Workbench (SPLASH 2010)
The Spoofax Language Workbench (SPLASH 2010)
 
Web programming UNIT II by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh MalothWeb programming UNIT II by Bhavsingh Maloth
Web programming UNIT II by Bhavsingh Maloth
 
C tutorials
C tutorialsC tutorials
C tutorials
 
Integrated Language Definition Testing: Enabling Test-Driven Language Develop...
Integrated Language Definition Testing: Enabling Test-Driven Language Develop...Integrated Language Definition Testing: Enabling Test-Driven Language Develop...
Integrated Language Definition Testing: Enabling Test-Driven Language Develop...
 
Ch1 Introducing C
Ch1 Introducing CCh1 Introducing C
Ch1 Introducing C
 

Viewers also liked

06 xml processing-in-.net
06 xml processing-in-.net06 xml processing-in-.net
06 xml processing-in-.netglubox
 
Memory Management & Garbage Collection
Memory Management & Garbage CollectionMemory Management & Garbage Collection
Memory Management & Garbage CollectionAbhishek Sur
 
ASP.Net Presentation Part2
ASP.Net Presentation Part2ASP.Net Presentation Part2
ASP.Net Presentation Part2Neeraj Mathur
 
An isas presentation on .net framework 2.0 by vikash chandra das
An isas presentation on .net framework 2.0 by vikash chandra dasAn isas presentation on .net framework 2.0 by vikash chandra das
An isas presentation on .net framework 2.0 by vikash chandra dasVikash Chandra Das
 
Simple xml in .net
Simple xml in .netSimple xml in .net
Simple xml in .netVi Vo Hung
 
Introduction to asp .net
Introduction to asp .netIntroduction to asp .net
Introduction to asp .netumesh patil
 
Exception Handling Mechanism in .NET CLR
Exception Handling Mechanism in .NET CLRException Handling Mechanism in .NET CLR
Exception Handling Mechanism in .NET CLRKiran Munir
 
ASP.NET Page Life Cycle
ASP.NET Page Life CycleASP.NET Page Life Cycle
ASP.NET Page Life CycleAbhishek Sur
 
Introduction to ADO.NET
Introduction to ADO.NETIntroduction to ADO.NET
Introduction to ADO.NETrchakra
 
Introduction to .NET Framework and C# (English)
Introduction to .NET Framework and C# (English)Introduction to .NET Framework and C# (English)
Introduction to .NET Framework and C# (English)Vangos Pterneas
 
Architecture of .net framework
Architecture of .net frameworkArchitecture of .net framework
Architecture of .net frameworkThen Murugeshwari
 
.NET and C# Introduction
.NET and C# Introduction.NET and C# Introduction
.NET and C# IntroductionSiraj Memon
 
Introduction to .net framework
Introduction to .net frameworkIntroduction to .net framework
Introduction to .net frameworkArun Prasad
 
Computer science seminar topics
Computer science seminar topicsComputer science seminar topics
Computer science seminar topics123seminarsonly
 
Latest Seminar Topics for Engineering,MCA,MSc Students
Latest Seminar Topics for Engineering,MCA,MSc StudentsLatest Seminar Topics for Engineering,MCA,MSc Students
Latest Seminar Topics for Engineering,MCA,MSc StudentsArun Kumar
 

Viewers also liked (20)

06 xml processing-in-.net
06 xml processing-in-.net06 xml processing-in-.net
06 xml processing-in-.net
 
Memory Management & Garbage Collection
Memory Management & Garbage CollectionMemory Management & Garbage Collection
Memory Management & Garbage Collection
 
ASP.Net Presentation Part2
ASP.Net Presentation Part2ASP.Net Presentation Part2
ASP.Net Presentation Part2
 
An isas presentation on .net framework 2.0 by vikash chandra das
An isas presentation on .net framework 2.0 by vikash chandra dasAn isas presentation on .net framework 2.0 by vikash chandra das
An isas presentation on .net framework 2.0 by vikash chandra das
 
Simple xml in .net
Simple xml in .netSimple xml in .net
Simple xml in .net
 
Introduction to asp .net
Introduction to asp .netIntroduction to asp .net
Introduction to asp .net
 
Exception Handling Mechanism in .NET CLR
Exception Handling Mechanism in .NET CLRException Handling Mechanism in .NET CLR
Exception Handling Mechanism in .NET CLR
 
ASP.NET Page Life Cycle
ASP.NET Page Life CycleASP.NET Page Life Cycle
ASP.NET Page Life Cycle
 
Introduction To C#
Introduction To C#Introduction To C#
Introduction To C#
 
ADO.NET
ADO.NETADO.NET
ADO.NET
 
For Beginers - ADO.Net
For Beginers - ADO.NetFor Beginers - ADO.Net
For Beginers - ADO.Net
 
Introduction to ADO.NET
Introduction to ADO.NETIntroduction to ADO.NET
Introduction to ADO.NET
 
Introduction to .NET Framework
Introduction to .NET FrameworkIntroduction to .NET Framework
Introduction to .NET Framework
 
Introduction to .NET Framework and C# (English)
Introduction to .NET Framework and C# (English)Introduction to .NET Framework and C# (English)
Introduction to .NET Framework and C# (English)
 
C# basics
 C# basics C# basics
C# basics
 
Architecture of .net framework
Architecture of .net frameworkArchitecture of .net framework
Architecture of .net framework
 
.NET and C# Introduction
.NET and C# Introduction.NET and C# Introduction
.NET and C# Introduction
 
Introduction to .net framework
Introduction to .net frameworkIntroduction to .net framework
Introduction to .net framework
 
Computer science seminar topics
Computer science seminar topicsComputer science seminar topics
Computer science seminar topics
 
Latest Seminar Topics for Engineering,MCA,MSc Students
Latest Seminar Topics for Engineering,MCA,MSc StudentsLatest Seminar Topics for Engineering,MCA,MSc Students
Latest Seminar Topics for Engineering,MCA,MSc Students
 

Similar to Introduction of c# day3

C# lecture 1: Introduction to Dot Net Framework
C# lecture 1: Introduction to Dot Net FrameworkC# lecture 1: Introduction to Dot Net Framework
C# lecture 1: Introduction to Dot Net FrameworkDr.Neeraj Kumar Pandey
 
Object oriented programming 7 first steps in oop using c++
Object oriented programming 7 first steps in oop using  c++Object oriented programming 7 first steps in oop using  c++
Object oriented programming 7 first steps in oop using c++Vaibhav Khanna
 
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 introductionAKR Education
 
Learn C# programming - Program Structure & Basic Syntax
Learn C# programming - Program Structure & Basic SyntaxLearn C# programming - Program Structure & Basic Syntax
Learn C# programming - Program Structure & Basic SyntaxEng Teong Cheah
 
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 C#
C++ vs C#C++ vs C#
C++ vs C#sudipv
 
C++ language basic
C++ language basicC++ language basic
C++ language basicWaqar Younis
 
C# programming language
C# programming languageC# programming language
C# programming languageswarnapatil
 
Structure of a C# Program
Structure of a C# ProgramStructure of a C# Program
Structure of a C# ProgramAli Hassan
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming LanguageRamaBoya2
 
Chapter 1: Introduction
Chapter 1: IntroductionChapter 1: Introduction
Chapter 1: IntroductionEric Chou
 
Event Driven Programming in C#.docx
Event Driven Programming in C#.docxEvent Driven Programming in C#.docx
Event Driven Programming in C#.docxLenchoMamudeBaro
 

Similar to Introduction of c# day3 (20)

C# lecture 1: Introduction to Dot Net Framework
C# lecture 1: Introduction to Dot Net FrameworkC# lecture 1: Introduction to Dot Net Framework
C# lecture 1: Introduction to Dot Net Framework
 
Object oriented programming 7 first steps in oop using c++
Object oriented programming 7 first steps in oop using  c++Object oriented programming 7 first steps in oop using  c++
Object oriented programming 7 first steps in oop using c++
 
C sharp chap1
C sharp chap1C sharp chap1
C sharp chap1
 
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
 
Learn C# programming - Program Structure & Basic Syntax
Learn C# programming - Program Structure & Basic SyntaxLearn C# programming - Program Structure & Basic Syntax
Learn C# programming - Program Structure & Basic Syntax
 
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)
 
C#.NET
C#.NETC#.NET
C#.NET
 
C++ vs C#
C++ vs C#C++ vs C#
C++ vs C#
 
Overview of c#
Overview of c#Overview of c#
Overview of c#
 
C-sharping.docx
C-sharping.docxC-sharping.docx
C-sharping.docx
 
C++ language basic
C++ language basicC++ language basic
C++ language basic
 
C# programming language
C# programming languageC# programming language
C# programming language
 
Structure of a C# Program
Structure of a C# ProgramStructure of a C# Program
Structure of a C# Program
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
 
Anagha
AnaghaAnagha
Anagha
 
chapter 1.pptx
chapter 1.pptxchapter 1.pptx
chapter 1.pptx
 
C# chap 1
C# chap 1C# chap 1
C# chap 1
 
All experiment of java
All experiment of javaAll experiment of java
All experiment of java
 
Chapter 1: Introduction
Chapter 1: IntroductionChapter 1: Introduction
Chapter 1: Introduction
 
Event Driven Programming in C#.docx
Event Driven Programming in C#.docxEvent Driven Programming in C#.docx
Event Driven Programming in C#.docx
 

Recently uploaded

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 

Recently uploaded (20)

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 

Introduction of c# day3

  • 1. All Right Reserved@ aumcp group of annamalai university(Arun Singh) Introduction of C# Presented By Arun Kumar Singh &Team Master of Computer Application Microsoft® Certified Professional MCP id- 7802107 arunsingh026@hotmail.com 1 www.microsoft.mcp.com 7/30/20131
  • 2. WHAT IS C#? • C# (pronounced as ‘c sharp’) is a new computer programming language developed by Microsoft Corporation,USA. • C# is fully object oriented language like JAVA and is the first component-oriented language • Its development team is led by Anders Hejlsberg. • It is a simple ,efficient language derived from the popular c and c++. • Major parts of .NET framework is actually coded by C# • The most recent version is C# 5.0, which was released on August 15, 2012. • It is only component –oriented language available today. • C# is combines with the best features of visual basic , C++, and java. 7/30/2013 All Right Reserved@ aumcp group of annamalai university(Arun Singh) 2
  • 3. HISTORY ………………… • During the development of the .NET Framework, the class libraries were originally written using a managed code compiler system called Simple Managed C (SMC) • In January 1999,Anders Hejlsberg formed a team to build a new language at the time called Cool, which stood for "C-like Object Oriented Language". • Microsoft had considered keeping the name "Cool" as the final name of the language, but chose not to do so for trademark reasons. • By the time the .NET project was publicly announced at the July 2000 Professional Developers Conference, (MCP conference) the language had been renamed C#, and the class libraries and ASP.NET runtime had been ported to C#. • James Gosling, who created the Java programming language in 1994, and Bill Joy, a co- founder of Sun Microsystems, the originator of Java, called C# an "imitation" of Java; Gosling further claimed that "[C# is] sort of Java with reliability, productivity and security. Klaus Kraft and Angelika Langer (authors of a C++ streams book) stated in a blog post that "Java and C# are almost identical programming languages. Hardly anybody will claim that Java or C# are revolutionary programming languages that changed the way we write programs," and "C# borrowed a lot from Java - and vice versa. 7/30/2013 All Right Reserved@ aumcp group of annamalai university(Arun Singh) 3
  • 4. • Now that C# supports boxing and unboxing, we'll have a very similar feature in Java.Anders Hejlsberg has argued that C# is "not a Java clone" and is "much closer to C++" in its design. Versions: C# 1.0 January 2002 .NET Framework 1.0 Visual Studio .NET 2002 C# 1.2 April 2003 .NET Framework 1.1 Visual Studio .NET 2003 C# 2.0 November 2005 .NET Framework 2.0 Visual Studio 2005 .NET Framework 2.0 Visual Studio 2008 C# 3.0 November 2007 .NET Framework 3.0 Visual Studio 2010 .NET Framework 3.5 C# 4.0 April 2010 .NET Framework 4 Visual Studio 2010 C# 5.0 August 2012 .NET Framework 4.5 Visual Studio 2012 . 7/30/2013 All Right Reserved@ aumcp group of annamalai university(Arun Singh)4
  • 5. EVOLUTION OF C# C C++ JAVA C# VB Component orientation concept ProductivityElegance 7/30/2013All Right Reserved@ aumcp group of annamalai university(Arun Singh)5
  • 6. HOW DOES C# DIFFER FROM C++? • As stated earlier, c# was derived from c++ to make it the language of choice for c and c++ Programmers. • C# therefore shares major parts of syntax with c++.however , the c# designer introduce a few changes in the syntax of C++ and removed a few features primarily to reduce the common pitfalls that occurred in c++ program development. • They also added a number of additional features to make C# a type safe and web enabled language. C++ features: 1. Macros 2. Multiple Inheritance 3. Templates 4. Pointers 5. GlobalVariable 6. Typedef statement 7. Default arguments 8. Constant member function or parameter 7/30/2013 All Right Reserved@ aumcp group of annamalai university(Arun Singh) 6
  • 7. Enhancement to C#....... 1. Automatic garbage collection 2. Version Support 3. Strict type safety 4. Properties to access data members 5. Delegates and events 6. Web services and much more…………………… 7/30/2013 All Right Reserved@ aumcp group of annamalai university(Arun Singh) 7
  • 8. HOW DOES C# DIFFER FROM JAVA? • Like c# ,JAVA was also derived from C++ and therefore they have similar roots. Moreover, c# was developed by Microsoft as an alternative to java for web programming . • C# borrowed many goods features from JAVA, which has already become a popular internet language. • However, there exist a number of difference b/w c# and JAVA. 1. c# has more primitive data types than java. 2. Arrays are declared differtly in c# than java. 3. C# provides better versioning supports than java. 4. C# adds internal a new accessibility modifiers. 5. There is no labeled break statements in c#. The goto is used to achieve this And much more………… 7/30/2013 All Right Reserved@ aumcp group of annamalai university(Arun Singh) 8
  • 9. MY FIRST C# HELLO PROGRAM using System; class Samplefirst { public static void Main(string[] args) { Console.WriteLine("hello c#, i feeling great being with u"); } } 7/30/2013 All Right Reserved@ aumcp group of annamalai university(Arun Singh) 9
  • 10. 7/30/2013 All Right Reserved@ aumcp group of annamalai university(Arun Singh) 10 USING: The using keyboard are allowed to us to use the various classes and interface etc. Which are define in respective Namespace. EX--- using System; //default Namespace System Console (namespace) (class) NOTE: using also contain a nested namespace. using namespace1.namespace2; a namespace2 which are define into a namespace1, so we define like that…………… EX---- using System.Collection;
  • 11. 7/30/2013 All Right Reserved@ aumcp group of annamalai university(Arun Singh) 11 The Namespace keyword: Namespace is nothing but a logical collection of related classes. The basic namespace of c# is System namespace. Which are contain all general classes and interfaces, Methods, which are generally used in a program. EX--- Namespace Class using System.Console.WriteLine(); keyword Methods Class: The c# program are allow to you to define a at least one class in your program, which Are build the main function.
  • 12. 7/30/2013 All Right Reserved@ aumcp group of annamalai university(Arun Singh) 12 Syntax class <class-name> { main function() { // statements parts is there……………. } }
  • 13. 7/30/2013 All Right Reserved@ aumcp group of annamalai university(Arun Singh) 13 The Main() Function: public static void Main(string args[]) • This is one of the standard signatures of the c# program. This methods act as entry point of your program • C# starts its execution from first line of your program and go for a end point of main method . • The keyword public is an access modifiers that tells that c# complier that main method can accessible by anyone • static- The main methods are design as a static, Why it is –it will called by a CLR without making any object . • void - The main method does not return any values. • string args[] – is a parameter list which are passed into a command line arguments. And taking a value in form of string. This is optional, but in java it is necessary. • NOTE: the c# always take a value in form of String.
  • 14. 7/30/2013 All Right Reserved@ aumcp group of annamalai university(Arun Singh) 14 COMMENTS: There are three kinds of comments, which are define into C#. • Single line comment e.g. // Similar in java • Multi line comment e.g. /* */ • Documents /// but in java-> /**………….*/ class Program // here we define class { static void Main(string[] args)// this is main function {/* there are stats in which in main function*/ Console.Write("hello c#");///lssjssdcks ///cksjcc ///cbkx ///xnx ///xdcjbs } }
  • 15. 7/30/2013 All Right Reserved@ aumcp group of annamalai university(Arun Singh) 15 SOME IMPORTANTS FACTS: • White spaces are ignored EX- class Program { static void Main(string[] args) { Console.Write("hello c#"); } } • Do not need to save your program. • This is not necessary that main method contain the arguments ‘(string args[])’. It is optional parameter. But in java is necessary to define a arguments. static void Main() { Console.Write("hello c#"); }
  • 16. 7/30/2013 All Right Reserved@ aumcp group of annamalai university(Arun Singh) 16 MAIN RETURN A VALUE: class sampletwo { static int Main(string[] args) { Console.Write("hello c#"); return 0; } NOTE: Another important aspect is the return type of Main().we have used void as the return in earlier programs .Main() can also return a value if it is declare as int type instead of void. When the return type in int, we must a return statement at the end of the method as shown above program. Return an integer type value to the system .the value return serve as the program termination Status code
  • 17. 7/30/2013All Right Reserved@ aumcp group of annamalai university(Arun Singh)17 QUESTION REVIEW: 1. State at least five most important highlights of c# language. 2. How the c# better than java? 3. C# is modern language. Comment? 4. State five features of c++ that have not been incorporated into c#. 5. Explain the CLR? 6. State the software engineering phases, why it is important? 7. Why c# is very popular state one technical reason?
  • 18. Next Conti……………….. 7/30/2013 All Right Reserved@ aumcp group of annamalai university(Arun Singh)18
  • 19. Q &A Session More Information PostYour Questions on www.aumcp2013.jimdo.com aumcp2013@live.com All Right Reserved@ aumcp group of annamalai university(Arun Singh) 7/30/201319
  • 20. Thanks to All All Right Reserved@ aumcp group of annamalai university(Arun Singh) 7/30/201320