SlideShare a Scribd company logo
1 of 28
C# Presentation
Trey Mack
James Moore
Osa Osar-Emokpae
C# Presentation, Spring 2003
Introduction
C#, pronounced “C Sharp,” is one of
the new languages in the .NET
framework being implemented by
Microsoft. All .NET languages
compile to a common byte code
(MSIL) making their integration into
programs written in different
languages easier.
C# Presentation, Spring 2003
History
 C
 C++
 Developed by Anders Hejlsberg
• Turbo Pascal
• Delphi
• Visual J++
 Released in 2001-2002
C# Presentation, Spring 2003
Previous Problems
 Memory Leaks
 Illegal Pointer References
 Overly Complex Multiple-Inheritance
 Static Linking
C# Presentation, Spring 2003
Resolutions
 Garbage Collection
 Threw out pointers
 Single inheritance with Interfaces
 Dynamic Linking
 Done 5 years ago in Java
C# Presentation, Spring 2003
What is C#
 Contrary to popular belief, C# is
not simply a clone of or
replacement for Java
 According to Anders Hejlsberg,
Microsoft’s Chief Architect, C# is a
derivation of C++, C, Java, Modula
2, and Smalltalk
C# Presentation, Spring 2003
What is C#
 C# combines the best features of
these languages and eradicates
some of their weaknesses
C# Presentation, Spring 2003
Why Choose C#?
 C# was designed from scratch with
the .net framework in mind
 C# combines the power of C and
C++ with the productivity of Visual
Basic
 With its familiar syntax the
transition for Java and C++
programmers will be an easy one
C# Presentation, Spring 2003
Why Choose C#?
C# is in sync with current web
standards and is easily integrated
with existing applications.
In today’s society where internet
programming is inevitable having a
language that already supports this
makes the job of the developer
easier.
C# Presentation, Spring 2003
Example of Code
The code looks a lot like Java
public class Example
{
public static void Main(string[] args)
{
foreach (string s in args)
{
System.Console.WriteLine(s);
}
}
}
C# Presentation, Spring 2003
Features
 OOP
C# Presentation, Spring 2003
OOP
C# is object oriented. Every class is a
subclass of an object. Everything is
an object, yes even primitives. This
makes generic programming easier.
Example:
int n = 3;
string s = n.ToString();
C# Presentation, Spring 2003
Features
 OOP
 Enumerators
C# Presentation, Spring 2003
Enumerators
Enumerators are a borrowed idea
from C/C++. This is a data type
consisting of a set of of named
integers.
Example:
enum Weekday {Mon, Tues, Wed, Thu,
Fri, Sat, Sun};
C# Presentation, Spring 2003
Features
 OOP
 Enumerators
 Operator Overloading
C# Presentation, Spring 2003
Operator Overloading
Operator Overloading is yet another
idea borrowed from c++. This
makes polymorphism easier with
custom data types.
Example:
Currency a, b, c;
c = a + b;
C# Presentation, Spring 2003
Features
 OOP
 Enumerators
 Operator Overloading
 Windows API Invocation
C# Presentation, Spring 2003
Windows API Invocation
C# was built with Windows in mind.
It was created to allow programmers
to create Windows application easily
through a wraparound API. Some
other technologies supported are
COM, COM+.
C# Presentation, Spring 2003
Features
 OOP
 Enumerators
 Operator Overloading
 Windows API Invocation
 Structured Error Handling
C# Presentation, Spring 2003
Structured Error Handling
C# introduces new error handling
techniques.
Try-catch blocks are used but with
more functionality.
To throw an object, it has to be a
subclass of System.Exception.
C# Presentation, Spring 2003
Try-Catch
try-catch blocks could be any of the following;
 try{ } catch(SomeException){ }
 try{ } catch(){ } //catches any kind of exception
 try{ } catch(){ } finally{ } //finally is always
executed
 try{ } finally{ } //finally is always executed
C# Presentation, Spring 2003
Features
 OOP
 Enumerators
 Operator Overloading
 Windows API Invocation
 Structured Error Handling
 Delegates
C# Presentation, Spring 2003
Delegates
Delegates provide a template for a
single method.
Example:
 public delegate int ArithOp(int a, int b);
 …
 public int DoOp(ArithOp ar)
 { return ar(a, b); }
C# Presentation, Spring 2003
Features
 OOP
 Enumerators
 Operator Overloading
 Windows API Invocation
 Structured Error Handling
 Delegates
 Namespaces
C# Presentation, Spring 2003
Namespace
Namespace is a method of organizing
similar files together. This is similar in
some way to the java package idea.
Every program is either explicitly within a
namespace or in by default.
Example:
 namespace Project{ public class P1{} }
 public class P2{}
C# Presentation, Spring 2003
Namespace
To use a namespace, you just simply import
by using the keyword using.
Example:
using system;
public class P1{}
C# Presentation, Spring 2003
Future of C#
With C#’s flexibility and support for
many languages through the .NET
architecture it will definitely become
a widely used language in all
aspects of programming.
C# Presentation, Spring 2003
Bibliography
 C# programming, Harvey, Robinson, Templeman,
Watson
 http://www.funducode.com/csharp/basics/basi
cs1.htm
 http://www.simonrobinson.com/DotNET/Article
s/Languages/IntroCSh.aspx
 http://windows.oreilly.com/news/hejlsberg_08
00.html
 http://msdn.microsoft.com/msdnmag/issues/0
900/csharp/default.aspx

More Related Content

Similar to CSharp.ppt

Similar to CSharp.ppt (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
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
java vs C#
java vs C#java vs C#
java vs C#
 
Intro dotnet
Intro dotnetIntro dotnet
Intro dotnet
 
Difference between Java and c#
Difference between Java and c#Difference between Java and c#
Difference between Java and c#
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
 
introduction of c langauge(I unit)
introduction of c langauge(I unit)introduction of c langauge(I unit)
introduction of c langauge(I unit)
 
Framework engineering JCO 2011
Framework engineering JCO 2011Framework engineering JCO 2011
Framework engineering JCO 2011
 
Objective c beginner's guide
Objective c beginner's guideObjective c beginner's guide
Objective c beginner's guide
 
C#unit4
C#unit4C#unit4
C#unit4
 
Migrating From Cpp To C Sharp
Migrating From Cpp To C SharpMigrating From Cpp To C Sharp
Migrating From Cpp To C Sharp
 
C# tutorial
C# tutorialC# tutorial
C# tutorial
 
Object oriented slides
Object oriented slidesObject oriented slides
Object oriented slides
 
Lecture 11
Lecture 11Lecture 11
Lecture 11
 
Event Driven Programming in C#.docx
Event Driven Programming in C#.docxEvent Driven Programming in C#.docx
Event Driven Programming in C#.docx
 
Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)
 
Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)Intro to c# (vs. objective c and java)
Intro to c# (vs. objective c and java)
 

Recently uploaded

%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...masabamasaba
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Hararemasabamasaba
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationJuha-Pekka Tolvanen
 
tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 

Recently uploaded (20)

%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 

CSharp.ppt

  • 1. C# Presentation Trey Mack James Moore Osa Osar-Emokpae
  • 2. C# Presentation, Spring 2003 Introduction C#, pronounced “C Sharp,” is one of the new languages in the .NET framework being implemented by Microsoft. All .NET languages compile to a common byte code (MSIL) making their integration into programs written in different languages easier.
  • 3. C# Presentation, Spring 2003 History  C  C++  Developed by Anders Hejlsberg • Turbo Pascal • Delphi • Visual J++  Released in 2001-2002
  • 4. C# Presentation, Spring 2003 Previous Problems  Memory Leaks  Illegal Pointer References  Overly Complex Multiple-Inheritance  Static Linking
  • 5. C# Presentation, Spring 2003 Resolutions  Garbage Collection  Threw out pointers  Single inheritance with Interfaces  Dynamic Linking  Done 5 years ago in Java
  • 6. C# Presentation, Spring 2003 What is C#  Contrary to popular belief, C# is not simply a clone of or replacement for Java  According to Anders Hejlsberg, Microsoft’s Chief Architect, C# is a derivation of C++, C, Java, Modula 2, and Smalltalk
  • 7. C# Presentation, Spring 2003 What is C#  C# combines the best features of these languages and eradicates some of their weaknesses
  • 8. C# Presentation, Spring 2003 Why Choose C#?  C# was designed from scratch with the .net framework in mind  C# combines the power of C and C++ with the productivity of Visual Basic  With its familiar syntax the transition for Java and C++ programmers will be an easy one
  • 9. C# Presentation, Spring 2003 Why Choose C#? C# is in sync with current web standards and is easily integrated with existing applications. In today’s society where internet programming is inevitable having a language that already supports this makes the job of the developer easier.
  • 10. C# Presentation, Spring 2003 Example of Code The code looks a lot like Java public class Example { public static void Main(string[] args) { foreach (string s in args) { System.Console.WriteLine(s); } } }
  • 11. C# Presentation, Spring 2003 Features  OOP
  • 12. C# Presentation, Spring 2003 OOP C# is object oriented. Every class is a subclass of an object. Everything is an object, yes even primitives. This makes generic programming easier. Example: int n = 3; string s = n.ToString();
  • 13. C# Presentation, Spring 2003 Features  OOP  Enumerators
  • 14. C# Presentation, Spring 2003 Enumerators Enumerators are a borrowed idea from C/C++. This is a data type consisting of a set of of named integers. Example: enum Weekday {Mon, Tues, Wed, Thu, Fri, Sat, Sun};
  • 15. C# Presentation, Spring 2003 Features  OOP  Enumerators  Operator Overloading
  • 16. C# Presentation, Spring 2003 Operator Overloading Operator Overloading is yet another idea borrowed from c++. This makes polymorphism easier with custom data types. Example: Currency a, b, c; c = a + b;
  • 17. C# Presentation, Spring 2003 Features  OOP  Enumerators  Operator Overloading  Windows API Invocation
  • 18. C# Presentation, Spring 2003 Windows API Invocation C# was built with Windows in mind. It was created to allow programmers to create Windows application easily through a wraparound API. Some other technologies supported are COM, COM+.
  • 19. C# Presentation, Spring 2003 Features  OOP  Enumerators  Operator Overloading  Windows API Invocation  Structured Error Handling
  • 20. C# Presentation, Spring 2003 Structured Error Handling C# introduces new error handling techniques. Try-catch blocks are used but with more functionality. To throw an object, it has to be a subclass of System.Exception.
  • 21. C# Presentation, Spring 2003 Try-Catch try-catch blocks could be any of the following;  try{ } catch(SomeException){ }  try{ } catch(){ } //catches any kind of exception  try{ } catch(){ } finally{ } //finally is always executed  try{ } finally{ } //finally is always executed
  • 22. C# Presentation, Spring 2003 Features  OOP  Enumerators  Operator Overloading  Windows API Invocation  Structured Error Handling  Delegates
  • 23. C# Presentation, Spring 2003 Delegates Delegates provide a template for a single method. Example:  public delegate int ArithOp(int a, int b);  …  public int DoOp(ArithOp ar)  { return ar(a, b); }
  • 24. C# Presentation, Spring 2003 Features  OOP  Enumerators  Operator Overloading  Windows API Invocation  Structured Error Handling  Delegates  Namespaces
  • 25. C# Presentation, Spring 2003 Namespace Namespace is a method of organizing similar files together. This is similar in some way to the java package idea. Every program is either explicitly within a namespace or in by default. Example:  namespace Project{ public class P1{} }  public class P2{}
  • 26. C# Presentation, Spring 2003 Namespace To use a namespace, you just simply import by using the keyword using. Example: using system; public class P1{}
  • 27. C# Presentation, Spring 2003 Future of C# With C#’s flexibility and support for many languages through the .NET architecture it will definitely become a widely used language in all aspects of programming.
  • 28. C# Presentation, Spring 2003 Bibliography  C# programming, Harvey, Robinson, Templeman, Watson  http://www.funducode.com/csharp/basics/basi cs1.htm  http://www.simonrobinson.com/DotNET/Article s/Languages/IntroCSh.aspx  http://windows.oreilly.com/news/hejlsberg_08 00.html  http://msdn.microsoft.com/msdnmag/issues/0 900/csharp/default.aspx