Академический Документы
Профессиональный Документы
Культура Документы
NET Framework
&
C#
.NET Framework
Problem background
Solution
Common Language Runtime (CLR)
MS Intermediate Language
MSIL Structure
MSIL and Java bytecode
Introduction to C# language
C# Structure
C# Features
Problems Background
Good code is hard to write
All system features in any language
COM problems
Platform Interoperability
Automatic memory management
Object-Oriented features in and between all PLs
Safety & Security
Better Access to OS functions
Interoperate with COM (both as client & server)
Solution (Common Language Runtime)
Managed Code in Common Language Runtime
Managed Code
Win 32 OS
Solution (Microsoft Intermediate Language)
Different Languages are Compiled into MSIL
Development Just-In-Time
tools compiler
Source code : MS Intermediate Platform specific
Any languages Language code
.Net platform features
Automatic memory management
Explicit Versioning
OO features in any languages
Accessing system functionality throw a
hierarchical namespace
Code security
Interoperability with COM
Costs:
OS got harder to write
More memory and CPU time
CLR structure
Compare with traditional ways
C# VB C++ J-script other
Compiler
Executable Executables
Machine hardware
A simple example
TimeComponent.vb
Imports Microsoft.VisualBasic
Namespace TimeComponentNS
End Function
End Class
End Namespace
Timeclient.cs
using System ;
using TimeComponentNS ;
class MainApp
{
public static void Main()
{
Private
In client directory
Public (shared)