这个概念叫什么? [英] what this concept call?

查看:69
本文介绍了这个概念叫什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SqlCommand obj = new SqlCommand {CommandType =,CommandText =};

SqlCommand obj=new SqlCommand{CommandType="",CommandText=""};

推荐答案

它被称为实例化或构造对象,或创建对象实例。

大括号的使用意味着你正在使用一个Object Initializer来构造新的实例。

见这里:如何:使用对象初始化程序初始化对象(C#编程指南) [ ^ ]
It's called Instantiating or Constructing an object, or creating an object instance.
The use of the curly brackets means you are using an Object Initializer to construct the new instance.
See here: How to: Initialize Objects by Using an Object Initializer (C# Programming Guide)[^]


这篇关于这个概念叫什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆