Introduction to C# презентация

Introduction to C#What is .NET?What is the CLR (Common language runtime)?Meaning of CLR
 Ouutput age of object
 	
 	using System; namespace ConsoleApplication_Test_Csharp {IL (Intermediate Language) 
 IL – special lowlevel language (like asm)Metadata
 Data for define objects (in *.exe or *.dll)How work JIT (Just-in-time compilation)?
 Analyze of head (32- or 64-bit)
 UseHow work JIT?What is the CTS (Common Type System)?
 A set of commonWhat is the CTS?What is the CLS?
 A specification of language features
 how methodsWhat is the CLS?The Class Libraries
 The common classes used in many programs
 likeAssemblies
 Code contained in files called “assemblies”
 code and metadata
 .dllCOM vs .NET
 Historically, COM provided this integration
 support for interfacesASP.NET and ADO.NET
 Use .NET languages in web pages
 thus canWindows PowerShell
 New shell originally for MS Vista
 available for WinXP/2k3
First C# Program
  using System;  namespace Test { Constructions of Note
 using
 like import in Java: bring in namespaces
Constructions of Note
 Console.Write(Line)
 Takes a formatted string: “Composite Format”
 IndexedMore C# : basic inheritance
 class A {
  protected int



Слайды и текст этой презентации
Слайд 1
Описание слайда:
Introduction to C#


Слайд 2
Описание слайда:
What is .NET?

Слайд 3
Описание слайда:
What is the CLR (Common language runtime)?

Слайд 4
Описание слайда:
Meaning of CLR Ouutput age of object using System; namespace ConsoleApplication_Test_Csharp {   public class SomeClass   {     int age;     public int GetAge()     {       age = 22;       return age;     }   }   public sealed class Program   {             public static void Main()     {       System.Console.Write("My age is ");       SomeClass me = new SomeClass();       int myAge;       myAge = me.GetAge();       System.Console.WriteLine(myAge);       Console.ReadLine();     }       } }

Слайд 5
Описание слайда:
IL (Intermediate Language) IL – special lowlevel language (like asm)

Слайд 6
Описание слайда:
Metadata Data for define objects (in *.exe or *.dll)

Слайд 7
Описание слайда:
How work JIT (Just-in-time compilation)? Analyze of head (32- or 64-bit) Use MSCorEE.dll (C:\Windows\System32\MSCorEE.dll for 32-bit) from MSCorEE.dll initialize CLR, assembly entry point of Main() function of our program static void Main() {   System.Console.WriteLine("Hello ");   System.Console.WriteLine("Goodbye"); }

Слайд 8
Описание слайда:
How work JIT?

Слайд 9
Описание слайда:
What is the CTS (Common Type System)? A set of common types any language that runs in CLR should implement no syntax specified Languages often define aliases supports only single inheritance (unlike C ++) all types are inherited from System.Object (Object - type name, root of all other types, System - namespace) For example CTS defines System.Int32 – 4 byte integer C# defines int as an alias of System.Int32

Слайд 10
Описание слайда:
What is the CTS?

Слайд 11
Описание слайда:
What is the CLS? A specification of language features how methods may be called when constructors are called subset of the types in CTS are allowed For example Code that takes UInt32 in a public method UInt32 is not in the CLS Can mark classes as CLS-compliant not marked is assumed to mean not compliant

Слайд 12
Описание слайда:
What is the CLS?

Слайд 13
Описание слайда:
The Class Libraries The common classes used in many programs like Java Class Library eg. System.Console.WriteLine XML, Networking, Filesystem, Crypto, containers Can inherit from many of these classes Many languages run on .NET framework C#, C++, J#, Visual Basic even have Python (see IronPython)

Слайд 14
Описание слайда:
Assemblies Code contained in files called “assemblies” code and metadata .dll as before to run: public static void Main(string[] args) types private: local directory, not accessible by others eg. Wolfram .NETLink shared: well-known location, can be GAC strong names: use crypto for signatures then can add some versioning and trust

Слайд 15
Описание слайда:
COM vs .NET Historically, COM provided this integration support for interfaces and interaction given a GUID, lookup the type library dynamically instantiate class do RPC to make calls in many cases Difficult to get right software engineering problems not type safe at all

Слайд 16
Описание слайда:
ASP.NET and ADO.NET Use .NET languages in web pages thus can write typesafe code server-side or client-side Sharepoint interactions can log in Use the CLR to access databases in the manner of ODBC provides classes for access

Слайд 17
Описание слайда:
Windows PowerShell New shell originally for MS Vista available for WinXP/2k3 native .NET instantiates arbitary .NET classes and accesses them Also can access COM objects Allows better interaction with programs Can it surpass bash and others?

Слайд 18
Описание слайда:
First C# Program using System; namespace Test { int a = 137; class Hello { public static void Main(string[] args) { Console.WriteLine(“Hello {0}”, a); } } }

Слайд 19
Описание слайда:
Constructions of Note using like import in Java: bring in namespaces namespace disambiguation of names like Internet hierarchical names and Java naming class like in Java single inheritance up to object

Слайд 20
Описание слайда:
Constructions of Note 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]} also can use as in Java “Test “ + a

Слайд 21
Описание слайда:
More C# : basic inheritance class A { protected int a; public virtual void print() { Console.WriteLine(“a = “ + a); } } class B : A { public override void print() { Console.WriteLine(“a really = “ + (a + 137)); } }


Скачать презентацию на тему Introduction to C# можно ниже:

Похожие презентации