C ω? Replacing C #'s stuff? -- C # extension language ~

Source: Internet
Author: User

I think C # most people haven't learned it yet! Microsoft is studying new things again. It is named C ω, and ω is a symbol in mathematics. On the MS website, it is said to be an extension language of C, as for its syntax, the first time I saw it, people were dizzy and did not know what to write.

See the following code snippet:

Segment 1:

Using Microsoft. combench; using system; public class newsitem {attribute string title; attribute string author; struct {datetime date; string body;} public static void main () {newsitem news = <newsitem Title = "Hello World" author = "dare Obasanjo"> <date> {datetime. now} </date> <body> I am the first post of the New Year. </body> </newsitem>; console. writeline (News. title + "by" + news. author + "on" + news. date) ;}} Segment 2:
foreach (b in bs.book){  yield return <result>         {b.title}         {b.author}        </result>}

How is it? Dizzy, you can write the XML tag directly in the Code and call it. The following is an introduction and example about it in msdn:

Http://msdn.microsoft.com/library/default.asp? Url =/library/en-US/dnexxml/html/xml01142005.asp

Http://research.microsoft.com/Comega/doc/comega_startpage.htm

Now it has a compiler and can be integrated with vs after installation. . Net.

C ω compiler download page:

Http://research.microsoft.com/research/downloads/download.aspx? Fuid = {92e68cf7-ba75-4142-9ed0-25daed04efd7}

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.