婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > Windows Powershell 創建數組

Windows Powershell 創建數組

熱門標簽:如何根據經緯度百度地圖標注 地圖標注的圖案 莫拉克電梯系統外呼怎么設置 六寸地圖標注點怎么刪除 騰訊地圖標注中心怎么標注 萬全縣地圖標注app 新鄭電銷機器人一個月多少錢 電話機器人公司招聘 印臺區呼叫中心外呼系統

在Powershell中創建數組可以使用逗號。

PS C:Powershell> $nums=2,0,1,2
PS C:Powershell> $nums
2
0
1
2

對于連續的數字數組可以使用一個更快捷的方法

PS C:Powershell> $nums=1..5
PS C:Powershell> $nums
1
2
3
4
5

數組的多態
象變量一樣如果數組中元素的類型為弱類型,默認可以存儲不同類型的值。

PS C:Powershell> $array=1,"2012世界末日",([System.Guid]::NewGuid()),(get-date)
PS C:Powershell> $array
1
2012世界末日

Guid
----
06a88783-a181-4511-9e41-2780ecbd7924

DisplayHint : DateTime
Date    : 2011/12/9 0:00:00
Day     : 9
DayOfWeek  : Friday
DayOfYear  : 343
Hour    : 14
Kind    : Local
Millisecond : 910
Minute   : 15
Month    : 12
Second   : 45
Ticks    : 634590369459101334
TimeOfDay  : 14:15:45.9101334
Year    : 2011
DateTime  : 2011年12月9日 14:15:45

空數組和單元素數組
空數組

PS C:Powershell> $a=@()
PS C:Powershell> $a -is [array]
True
PS C:Powershell> $a.Count
0

1個元素的數組

PS C:Powershell> $a=,"moss"
PS C:Powershell> $a -is [array]
True
PS C:Powershell> $a.Count
1

您可能感興趣的文章:
  • Windows Powershell 訪問數組
  • Windows Powershell 復制數組
  • Windows Powershell強類型數組
  • Windows Powershell使用哈希表
  • Windows Powershell使用管道
  • Windows Powershell對象轉換成文本

標簽:汕頭 天水 疫苗接種 臨汾 襄陽 喀什 南昌 湘潭

巨人網絡通訊聲明:本文標題《Windows Powershell 創建數組》,本文關鍵詞  Windows,Powershell,創建,數組,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《Windows Powershell 創建數組》相關的同類信息!
  • 本頁收集關于Windows Powershell 創建數組的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 昌邑市| 神农架林区| 康平县| 兴城市| 昂仁县| 武冈市| 龙岩市| 阜城县| 潞城市| 武清区| 夏邑县| 天等县| 仙桃市| 吴旗县| 固安县| 山东省| 乌苏市| 龙海市| 崇仁县| 普安县| 德昌县| 秦皇岛市| 兴宁市| 罗江县| 泰州市| 当涂县| 北辰区| 乡城县| 灵武市| 措美县| 丹巴县| 耒阳市| 镇平县| 昆明市| 安平县| 墨江| 抚顺市| 泰兴市| 北京市| 鄂托克旗| 襄汾县|