日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > C# >内容正文

C#

C# Programming Language学习笔记(三)

發(fā)布時間:2025/5/22 C# 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 C# Programming Language学习笔记(三) 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
第二章 詞法結構
The lexical grammar defines how Unicode characters are combined to form line terminators, white space, comments, tokens, and preprocessing directives. The syntactic grammar defines how the tokens resulting from the lexical grammar are combined to form C# programs.
詞法分析定義如何把Unicode字符聯(lián)合形成行,空白符,注釋,標記和預處理.語法分析定義如何把從詞法分析中得到的標記聯(lián)合形成C#程序.
詞法分析還是比較麻煩的一部分,等日后看編譯原理的時候再回來瞧瞧.
第三章 基礎概念
1.An application domain enables application isolation by acting as a container for application state. An application domain acts as a container and boundary for the types defined in the application and the class libraries it uses. Types loaded into one application domain are distinct from the same type loaded into another application domain, and instances of objects are not directly shared between application domains. For instance, each application domain has its own copy of static variables for these types, and a static constructor for a type runs at most once per application domain. Implementations are free to provide implementation-specific policy or mechanisms for creating and destroying application domains.
程序域作為應用程序的狀態(tài)容器把程序隔離.程序域是程序中定義類型和使用的類庫的容器和邊界.加載到一個程序域中的類型區(qū)別與加載到另一程序域的同一類型,并且對象的實例在程序域間不能直接共享.比如,每一個程序域都有它們類型的靜態(tài)變量的拷貝,并且一個類型的靜態(tài)構造器在程序域中至多只能運行一次.執(zhí)行為創(chuàng)建和銷毀程序域自動提供具體的執(zhí)行策略和機制.
2.Because C# supports method overloading, a class or struct can contain multiple definitions of some method, provided each has a different signature. However, within a single program, no class or struct can contain more than one method called Main whose definition qualifies it to be used as an application entry point. Other overloaded versions of Main are permitted, however, provided they have more than one parameter or their only parameter is other than type string[].
C#支持方法重載,一個類或結構可以包含一些方法的多次定義,只要具有不同的簽名.但是,在一個單獨的程序中,沒有類和結構能夠包含多于一個的定義為用來作程序入口的稱為Main的方法.其它重載版本的Main方法是允許的,但是,要保證它們要多于一個參數(shù)或者有一個參數(shù),但類型不是string[].
3. Specifically, the execution environment can access the application's entry point regardless of its declared accessibility and regardless of the declared accessibility of its enclosing type declarations.
比較特殊的,執(zhí)行環(huán)境總是可以訪問程序的入口,不管入口聲明的訪問級別也不管入口所屬類型的訪問級別是什么.
4.Prior to an application's termination, destructors for all of its objects that have not yet been garbage collected are called, unless such cleanup has been suppressed (by a call to the library method GC.SuppressFinalize, for example).
在程序終止之前,程序中所有沒有被垃圾回收器收集的對象的析構器會被調(diào)用,除非這些清理已經(jīng)被強制執(zhí)行過(比如,調(diào)用庫方法GC.SuppressFinalize).

轉(zhuǎn)載于:https://www.cnblogs.com/Farseer1215/archive/2005/10/19/258022.html

總結

以上是生活随笔為你收集整理的C# Programming Language学习笔记(三)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。