码迷,mamicode.com
首页 > 其他好文 > 详细

New

时间:2016-04-27 01:48:06      阅读:187      评论:0      收藏:0      [点我收藏+]

标签:

1.运算符

使用对象初始值设定项来简化对象创建
// Object initializer.
var instance3 = new ExampleClass { Name = "Desktop", ID = 37414, Location = "Redmond", Age = 2.3 };

// Default constructor and assignment statements.
var instance4 = new ExampleClass();
instance4.Name = "Desktop";
instance4.ID = 37414;
instance4.Location = "Redmond";
instance4.Age = 2.3;

New

标签:

原文地址:http://www.cnblogs.com/dennysong/p/5437328.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!