C # 3.0 Language new features (language specification)

Source: Internet
Author: User
Tags anonymous expression new features
Specification

Original: "C # Version 3.0 Specification", Microsoft
Translation: Lover_p
C # 3.0 (C # orcas--Devil) introduces a number of language extensions on the basis of C # 2.0 to support the creation and use of higher-level functional-style libraries. These extensions enable structured API constructs to have the same expressive power as query languages in other domains, such as relational databases and XML. These extensions include:

A local variable that has an implicit type that allows the type of the local variable to be inferred by an expression used for initialization.

Extension methods, which make it possible to extend and construct a type with additional methods to an existing type into reality.

Lambda (Lambda) expression, an evolution of anonymous methods, provides improved type inference and transformation for delegate types and expression trees.

Object initializers, making it easy to construct and initialize objects.

Anonymous type, inferred and created by the object initializer.

An array with an implicit type that infers the element type from the array initializer and creates and initializes the array.

query expressions, which provide an integrated query syntax, similar to relational, hierarchical query languages such as SQL and XQuery.

Expression tree, which allows lambda expressions to be represented as data (expression trees) rather than code (delegates).



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.