如何声明和填充此数组? [英] How do I declare and fill this array?

查看:66
本文介绍了如何声明和填充此数组?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要decalre并用一些数字填充数组,5,7,8,9,0


我这样做:


Dim myarray为int =(5,7,8,9,0)


如果不是我怎么做?


谢谢。

I want to decalre and fill an array with some numbers, 5, 7, 8, 9, 0

do I just do this:

Dim myarray as int = (5,7,8,9,0)

if not how would i do this?

thanks.

推荐答案

在VB.net中试试这个:

Dim myarray As Integer() = {5,7,8,9,0}

" Ron" < pt ***** @ yahoo.comwrote in message

news:11 ********************* @ a75g2000cwd.googlegro ups.com ...
Try this in VB.net:
Dim myarray As Integer() = {5,7,8,9,0}
"Ron" <pt*****@yahoo.comwrote in message
news:11*********************@a75g2000cwd.googlegro ups.com...

>我想要decalre并用一些数字填充数组,5,7,8,9,0


我只是这样做:


Dim myarray为int =(5,7,8,9,0)


如果不是我怎么做?


谢谢。
>I want to decalre and fill an array with some numbers, 5, 7, 8, 9, 0

do I just do this:

Dim myarray as int = (5,7,8,9,0)

if not how would i do this?

thanks.



"罗恩" < pt ***** @ yahoo.comschrieb:
"Ron" <pt*****@yahoo.comschrieb:

>我想要decalre并用一些数字填充数组,5,7,8,9 ,0


我这样做:

Dim myarray为int =(5,7,8,9,0)


如果不是我怎么做?
>I want to decalre and fill an array with some numbers, 5, 7, 8, 9, 0

do I just do this:

Dim myarray as int = (5,7,8,9,0)

if not how would i do this?



\\\

Dim MyArray()As Integer = {5,7,8,9,0}

///


-

MS Herfried K. Wagner

MVP< URL:http ://dotnet.mvps.org/>

VB< URL:http://dotnet.mvps.org/dotnet/faqs/>

\\\
Dim MyArray() As Integer = {5, 7, 8, 9, 0}
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


这让我想知道,有什么区别:


Dim MyArray()As Integer = {5,7,8,9,0}





Dim myarray As Integer()= {5,7,8,9,0}


谢谢,


Doug


" Herfried K. Wagner [MVP]" < hi *************** @ gmx.atwrote in message

news:uM *************** @ TK2MSFTNGP04.phx.gbl ...
This makes me wonder, what''s the difference between:

Dim MyArray() As Integer = {5, 7, 8, 9, 0}

and

Dim myarray As Integer() = {5,7,8,9,0}

thanks,

Doug

"Herfried K. Wagner [MVP]" <hi***************@gmx.atwrote in message
news:uM***************@TK2MSFTNGP04.phx.gbl...

" Ron" < pt ***** @ yahoo.comschrieb:
"Ron" <pt*****@yahoo.comschrieb:

>>我想要decalre并用一些数字填充数组,5,7,8 ,9,我是这样做的:

Dim myarray为int =(5,7,8,9,0)

如果不是我该怎么做?
>>I want to decalre and fill an array with some numbers, 5, 7, 8, 9, 0

do I just do this:

Dim myarray as int = (5,7,8,9,0)

if not how would i do this?



\\\

Dim MyArray()As Integer = {5,7,8,9,0}

///


-

MS Herfried K. Wagner

MVP< URL:http ://dotnet.mvps.org/>

VB< URL:http://dotnet.mvps.org/dotnet/faqs/>


\\\
Dim MyArray() As Integer = {5, 7, 8, 9, 0}
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>



这篇关于如何声明和填充此数组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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