第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會有你想問的

c#如何動態(tài)創(chuàng)建數(shù)組

c#如何動態(tài)創(chuàng)建數(shù)組

C#
慕桂英3389331 2019-04-04 02:02:59
c#如何動態(tài)創(chuàng)建數(shù)組
查看完整描述

3 回答

?
開心每一天1111

TA貢獻(xiàn)1836條經(jīng)驗(yàn) 獲得超13個(gè)贊

C#動態(tài)創(chuàng)建數(shù)組不同于VB,C#動態(tài)創(chuàng)建數(shù)組通過一個(gè)實(shí)例介紹了C#動態(tài)創(chuàng)建數(shù)組的具體實(shí)現(xiàn)。

C#動態(tài)創(chuàng)建數(shù)組實(shí)例:

1

2

3

4

5

6

7

8

9

10

11

12

13

ArrayList al = new ArrayList();  

al.Add("song");  

al.Add("yun");   

String[] arr2;         

arr2 = (String[])(al.ToArray(typeof(String)));             

System.Diagnostics.Debug.Print("Arr2[0]=" + arr2[0]);   

 //type of  int  

ArrayList al2 = new ArrayList();   

al2.Add(23);   

al2.Add(4);   

int[] arr3;   

arr3 = (int[])(al2.ToArray(typeof(int)));  

System.Diagnostics.Debug.Print("Arr3[0]=" + arr3[0]);

 


查看完整回答
反對 回復(fù) 2019-04-05
?
汪汪一只貓

TA貢獻(xiàn)1898條經(jīng)驗(yàn) 獲得超8個(gè)贊

C#動態(tài)創(chuàng)建數(shù)組不同于VB,C#動態(tài)創(chuàng)建數(shù)組通過一個(gè)實(shí)例介紹了C#動態(tài)創(chuàng)建數(shù)組的具體實(shí)現(xiàn)。
C#動態(tài)創(chuàng)建數(shù)組實(shí)例:

ArrayList al = new ArrayList(); al.Add("song"); al.Add("yun"); String[] arr2; arr2 = (String[])(al.ToArray(typeof(String))); System.Diagnostics.Debug.Print("Arr2[0]=" + arr2[0]); //type of int ArrayList al2 = new ArrayList(); al2.Add(23); al2.Add(4); int[] arr3; arr3 = (int[])(al2.ToArray(typeof(int))); System.Diagnostics.Debug.Print("Arr3[0]=" + arr3[0]);

查看完整回答
反對 回復(fù) 2019-04-05
  • 3 回答
  • 0 關(guān)注
  • 1391 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號