C# 3.0預覽(1)

來源:互聯網
上載者:User

C# 3.0 (“C# Orcas”) introduces several language extensions that build on C# 2.0 to support the creation and use of higher order, functional style class libraries. The extensions enable construction of compositional APIs that have equal expressive power of query languages in domains such as relational databases and XML. The extensions include:(C# 3.0(C# Orcas——魔鬼)在C# 2.0的基礎上引入了很多語言擴充,用以支援進階別的函數式風格類庫的建立和使用。這些擴充使得結構性API構造具有與其他領域(如關聯式資料庫和XML)中查詢語言同等的表達能力。這些擴充包括:)

·         Implicitly typed local variables, which permit the type of local variables to be inferred from the expressions used to initialize them.(具有隱式類型的局部變數,允許通過用於初始化的運算式來推斷局部變數的類型。)

·         Extension methods, which make it possible to extend existing types and constructed types with additional methods.
   (展方法,使得對一個現存類型的擴充和構造具有附加方法的類型變為現實。)

·         Lambda expressions, an evolution of anonymous methods that provides improved type inference and conversions to both delegate types and expression trees.(拉姆達(Lambda)運算式,匿名方法的一種進化,為委託類型和運算式樹狀架構提供了改進的類型推斷和轉換。)

·         Object initializers, which ease construction and initialization of objects.(對象初始化器,使得構造和初始化對象變得容易。)

·         Anonymous types, which are tuple types automatically inferred and created from object initializers.(匿名型別,由對象初始化器推斷和建立出來的類型。)

·         Implicitly typed arrays, a form of array creation and initialization that infers the element type of the array from an array initializer.(具有隱式類型的數組,從數組初始化器推斷出元素類型並進行建立和初始化的數組。)

·         Query expressions, which provide a language integrated syntax for queries that is similar to relational and hierarchical query languages such as SQL and XQuery.(查詢運算式,提供了整合的查詢文法,與關係、分級查詢語言如SQL和XQuery類似。)

·         Expression trees, which permit lambda expressions to be represented as data (expression trees) instead of as code (delegates).(運算式樹狀架構,允許將拉姆達運算式表現為資料(運算式樹狀架構),而不是代碼(委託)。)

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.