Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.
- M . B H A R G A V .
1 0 B J 1 A 0 5 3 9 ,
C S E
Programming in C#
Course Overview
 1-credit pass/no-pass brief introduction to C#.
 Covers (most of) the C# language and some of the
most ...
S/U Details
 Requirements for the course
 Come to lecture
 Participate
 Do all assignments
 Assignments are S/U
 You...
Syllabus
 Background, history, CLI, CIL, CLR, CTS, …
 C# Types
 Primitive types, Classes, Properties, Interfaces,
Deleg...
Programming in C#
C# History
History of C#
 Developed by Microsoft.
 Based on Java and C++, but has many additional
extensions.
 Java and C# are bot...
Microsoft’s .NET Technologies
CLR and JIT compiling
 C#, like Java, is executed indirectly through an
abstract computer architecture called the CLR.
 ...
The CLR Architecture
Class Loader
MSIL to Native
Compilers (JIT)
Code
Manager
Garbage
Collector (GC)
Security Engine Debug...
PE executable file
Structure of PE file
PE header
MS IL instructions
Metadata
native instructions
Entry point address Othe...
Manifests and Assemblies
First C# Program
using System;
namespace Test
{
class ExampleClass
{
static void Main()
{
System.Console.WriteLine("Hello,...
Constructions of Note
 using
 like import in Java: bring in namespaces
 namespace
 disambiguation of names
 like Inte...
Constructions of Note
 static void Main()
 Defines the entry point for an assembly.
 Four different overloads – taking ...
Nächste SlideShare
Wird geladen in …5
×

C#

415 Aufrufe

Veröffentlicht am

Veröffentlicht in: Technologie
  • Als Erste(r) kommentieren

  • Gehören Sie zu den Ersten, denen das gefällt!

C#

  1. 1. - M . B H A R G A V . 1 0 B J 1 A 0 5 3 9 , C S E Programming in C#
  2. 2. Course Overview  1-credit pass/no-pass brief introduction to C#.  Covers (most of) the C# language and some of the most useful .NET API’s.  Should not be your first programming class.  Assume you know C++ and/or Java and basic object- oriented or component-based programming.  Requires (lots of) practice / reading.  C# and .NET cannot be learned thoroughly in this brief course.
  3. 3. S/U Details  Requirements for the course  Come to lecture  Participate  Do all assignments  Assignments are S/U  You will not be given a detailed grade  Show me that you understand the concepts, and can write C# code
  4. 4. Syllabus  Background, history, CLI, CIL, CLR, CTS, …  C# Types  Primitive types, Classes, Properties, Interfaces, Delegates, Events, Generic types.  C# language features  foreach, yield, events, is/as (type casting), lock.  Common Interfaces  Iterators, equality and comparison  Base Class Library
  5. 5. Programming in C# C# History
  6. 6. History of C#  Developed by Microsoft.  Based on Java and C++, but has many additional extensions.  Java and C# are both being updated to keep up with each other.  Cross-development with Visual Basic, Visual C++, and many other .NET languages.
  7. 7. Microsoft’s .NET Technologies
  8. 8. CLR and JIT compiling  C#, like Java, is executed indirectly through an abstract computer architecture called the CLR.  CLR => Common Language Runtime.  Abstract, but well defined.  C# programs are compiled to an IL.  Also called MSIL, CIL (Common Intermediate Language) or bytecode.
  9. 9. The CLR Architecture Class Loader MSIL to Native Compilers (JIT) Code Manager Garbage Collector (GC) Security Engine Debug Engine Type Checker Exception Manager Thread Support COM Marshaler Base Class Library Support
  10. 10. PE executable file Structure of PE file PE header MS IL instructions Metadata native instructions Entry point address Other initial settings e.g., x86 instructions Type Tables Attributes Security
  11. 11. Manifests and Assemblies
  12. 12. First C# Program using System; namespace Test { class ExampleClass { static void Main() { System.Console.WriteLine("Hello, world!"); } } }
  13. 13. Constructions of Note  using  like import in Java: bring in namespaces  namespace  disambiguation of names  like Internet hierarchical names and C++ naming  class  like in C++ or Java  single inheritance up to object
  14. 14. Constructions of Note  static void Main()  Defines the entry point for an assembly.  Four different overloads – taking string arguments and returning int’s.  Console.Write(Line)  Takes a formatted string: “Composite Format”  Indexed elements: e.g., {0}  can be used multiple times  only evaluated once  {index [,alignment][:formatting]}

×