• 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

  • 相关阅读:
    转:Java 6 JVM参数选项大全(中文版)
    转:Http Get Post put delete
    转:Google MapReduce中文版
    转:java.net.SocketException: Too many open files解决方法
    转:UML类图基础
    转:Maven常用命令
    转:ibatis配置简介
    转:导出 Oracle 数据库中所所有用户表的表结构
    C# 中使用iTextSharp组件修改PDF元数据(title,Keywords等)
    SQL Server跨服务器查询
  • 原文地址:https://www.cnblogs.com/yanlixin/p/632541.html
Copyright © 2020-2023  润新知