首页 > 其他 > 详细

Test

时间:2015-07-03 19:03:54      阅读:240      评论:0      收藏:0      [点我收藏+]

C#

using System;

#pragma warning disable 414, 3021

public class Program
{
    /// <summary>The entry point to the program.</summary>
    public static int Main(string[] args)
    {
        Console.WriteLine("Hello, World!");
        string s = @"This
""string""
spans
multiple
lines!";

        dynamic x = new ExpandoObject();
        x.MyProperty = 2;

        return 0;
    }
}

async Task<int> AccessTheWebAsync()
{
    // ...
    string urlContents = await getStringTask;
    return urlContents.Length;
}

internal static void ExceptionFilters()
{
  try 
  {
      throw new Exception();
  }
  catch (Exception e) when (e.Message == "My error") { }
}

Test

原文:http://www.cnblogs.com/dream8fly/p/4619386.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!