zoukankan      html  css  js  c++  java
  • What's New in the C# 3.0 Language and Compiler

    The C# 3.0 language and compiler introduce several new language features. These new language constructs are useful individually in various contexts, and collectively for doing Language-Integrated Query (LINQ). For more information about LINQ, see The LINQ Pro.

    Note

    The September 2006 Community Technology Preview version of the C# compiler and Visual C# IDE do not fully implement or support the C# 3.0 language specification. Error messages and IntelliSense™ support, even for implemented language features, are not yet complete. Therefore, to create LINQ projects you should use the May 2006 LINQ which includes a prototype version of the new compiler.

    The following table lists the new C# 3.0 language features:

    Feature

    Description

    Present in September 2006 CTP

    Implicitly Typed Local Variables (C# Programming Guide)

    When used with local variables, the var keyword instructs the compiler to infer the type of the variable from the expression on the right side of the initialization statement.

    Yes

    Object Initializers (C# Programming Guide)

    Enables object initialization without explicit calls to a constructor.

    Yes

    Collection Initializers (C# Programming Guide)

    Enables initialization of collections with an initialization list rather than specific calls to "Add" or another method.

    Partially

    Implicitly Typed Arrays (C# Programming Guide)

    Enables the type of the array instance to be inferred from the elements specified in the array initializer.

    No

    Extension Methods (C# Programming Guide)

    Extend existing classes with static methods that can be invoked by using instance method syntax.

    Partially

    Anonymous Types (C# Programming Guide)

    Enables on-the-fly creation of unnamed structured types that can be added to collections and accessed using var.

    No

    Lambdas (C# Programming Guide)

    Enables inline expressions with input parameters that can be bound to delegates or expression trees.

    Partially

    Query Keywords (C# Reference)

    Keywords that specify clauses in a query expression:

    • from clause(s)
    • where clause (optional)
    • ordering clauses (optional)
    • ordering direction clause (optional)
    • select or group clause
    • into clause (optional)

    Partially

    ms-help://MS.MSDNQTR.v90.en/MS.MSDN.v90/MS.VisualStudio.v90.en/dv_cscon/html/e5193336-6adb-471e-ab22-e3fc60e0fa52.htm

    以上文字来自 MSDN Library for Visual Studio Codename Orcas.

    本想弄个实际一点的代码来着。后来想想水平有限,时间有限就别丢人了J

  • 相关阅读:
    软件过程管理读书笔记02
    交叉验证
    oracle两张表数据匹配,Oracle-left join两表关联只取B表匹配到的第一条记录
    oracle批量新增
    oracle聚合函数XMLAGG用法简介
    form表单导致url连接重定向问题处理
    请求200,返回没内容,360可以看到response内容(待看),nginx返回内容被截取
    jsonp请求返回前面带有个null
    oracle日期转换的一些坑
    Java中将List<String>转化为以,分割的字符串或相反(转载)
  • 原文地址:https://www.cnblogs.com/yanlixin/p/632541.html
Copyright © 2011-2022 走看看