这是做什么的?对象[0] [英] What does this do? Object[0]

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

问题描述

对象MyOnject = new对象[0];


[0]表示什么?

-

Chad Z. Hower(又名Kudzu) - http://www.hower.org/Kudzu/

编程是一种反击的艺术形式

ELKNews - 获取免费副本 http://www.atozedsoftware.com

解决方案

< blockquote>


" Chad Z. Hower aka Kudzu" < CP ** @ hower.org>在消息中写道

news:Xn ****************** @ 127.0.0.1 ...

Object MyOnject =新对象[0];

[0]表示什么?




嗨Chad,


这意味着你实例化了一个长度为零的类型对象数组。


Joe

-
http://www.csharp-station.com


" Joe Mayo [MVP C#]" < JM *** @ nospamAtCSharpDashStation.com>写在

news:u8 ************** @ TK2MSFTNGP11.phx.gbl:

[0]表示什么?


这意味着你实例化了一个长度为零的类型对象数组。




Aah。那讲得通。我想这个位置以及我正在寻找一个构造函数
的事实让我感动。

-

Chad Z. Hower (又名Kudzu) - http://www.hower.org/Kudzu/

编程是一种反击的艺术形式

ELKNews - 获取免费副本 http://www.atozedsoftware.com




Joe Mayo [MVP C#]" < JM *** @ nospamAtCSharpDashStation.com>在消息中写道

news:u8 ************** @ TK2MSFTNGP11.phx.gbl ...



Chad Z. Hower aka Kudzu < CP ** @ hower.org>在消息中写道
新闻:Xn ****************** @ 127.0.0.1 ...

Object MyOnject = new Object [0 ];

[0]表示什么?
嗨Chad,

这意味着你实例化了一个长度为零的类型对象数组。



哪个,因为它不是立即显而易见,因为一个

对象(object [])的数组仍然是从对象派生而且将在没有< b / b
投诉。 Joe
-
http://www.csharp-station.com



Object MyOnject = new Object[0];

What does the [0] signify?
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"
ELKNews - Get your free copy at http://www.atozedsoftware.com

解决方案



"Chad Z. Hower aka Kudzu" <cp**@hower.org> wrote in message
news:Xn******************@127.0.0.1...

Object MyOnject = new Object[0];

What does the [0] signify?



Hi Chad,

It means you instantiated an array of type object with a Length of zero.

Joe
--
http://www.csharp-station.com


"Joe Mayo [MVP C#]" <jm***@nospamAtCSharpDashStation.com> wrote in
news:u8**************@TK2MSFTNGP11.phx.gbl:

What does the [0] signify?


It means you instantiated an array of type object with a Length of zero.



Aah. That makes sense. I guess the placement and the fact that I was looking
for a constructor in its place threw me.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"
ELKNews - Get your free copy at http://www.atozedsoftware.com



"Joe Mayo [MVP C#]" <jm***@nospamAtCSharpDashStation.com> wrote in message
news:u8**************@TK2MSFTNGP11.phx.gbl...



"Chad Z. Hower aka Kudzu" <cp**@hower.org> wrote in message
news:Xn******************@127.0.0.1...

Object MyOnject = new Object[0];

What does the [0] signify?
Hi Chad,

It means you instantiated an array of type object with a Length of zero.


Which, because it isn''t immediately obvious, works because an array of
object(object[]) is still derived from object and will assign without
complaint. Joe
--
http://www.csharp-station.com



这篇关于这是做什么的?对象[0]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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