zoukankan      html  css  js  c++  java
  • O'Reilly .NET Framework Essentials, 2nd Edition第三章

    3.1 common programming model

    3.1.1 System.Object
    Every type in .NET is an object, meaning that it must derive directly or indirectly form the Object class. The Object class exposes the public methods listed in table 3-1, which you can invoke on any given .NET object at runtime.

    Methods

    Description

    Equals()

    比较两个类,确定它们是否一致

    ReferenceEquals()

    比较两个类,确定它们是否引用了相同的类

    GetHashCode()

    获取对象的哈希代码

    GetType()

    获取对象的类型

    ToString()

    将对象转换为字符


    3.1.2 Major Namespaces

    Namespace

    Description

    System

    See detail at MSDN

    System. IO

    System.Collections

    System.Threading

    System.Reflection

    System.Security

    System.Net

    System.Data

    System.Web.Services

    System.Web.UI

    System..Windows.Forms


    3.2 Core Features and Languages
     Namespace
     Interface
     Encapsulation
     Inheritance
     Polymorphism?
     Exception handling


    3.2.1 Managed C++ Code
    (……)


    3.2.2 VB Code

    3.2.3 C# Code

    using System
    namespace  lang       //define a namespace
    {
    interface ISteering      //define interface
    {
    void TurnLeft()
    void TurnRight()
    }


    abstract class vehicle : Isteering       //define abstract class to implement interface.
    {
       
    public void TurnLeft()

    {
    Console.WriteLine(“Left”);
    }


    public void TurnRight()
    {
    Console.WriteLine(“Right”);
    }

    public abstract void ApplyBrakes();
    }
     

    class Car:Vehicle                //inherits a base class
    {
     
    public override void ApplyBrakes()   //override a methods

    {
     Conslose.WriteLine(“Stop”);
     Throw 
    new Exception(“stop false”);
    }

    }

    }


    3.2.4 Common Intermediate Language Code
    (…….)

    3.3 Language Integration

  • 相关阅读:
    IOS4.x下UIWebView的显示问题
    UIView的动画
    (转)iPhone实战:动态改变UITableView中的Cell高度
    (原) 定制使UITabBarController的tabbar选中tabbaritem时不高亮以及换背景色(支持iPad旋转)
    IOS开发问题汇总
    (转)公钥加密技术
    [Nikon D80]南门老家
    Realtime Ray Tracing RenderMan Point Cloud
    今天败入音特美ER6i
    Practice Realistic Human Skin Rendering In RenderMan Production Pipeline
  • 原文地址:https://www.cnblogs.com/yang_sy/p/1087940.html
Copyright © 2011-2022 走看看