Stady notes: Windows powershell tips -Even More Things You Can Do With Arrays
来源:互联网 发布:云计算开源平台 编辑:程序博客网 时间:2024/05/16 06:00
1.定义一个空的数组
$a = @() # 这样定义是不行的 [array]$a,奇怪的语法啊。
或者用。net framwork 里面的 $a = new-object System.collection.arrayList
2.定义一个固定类型的空数组
[int[]]$a = @()
3,定义一个已知元素的数组
$a = "one","two","three","four"
$a = 1,2,3,4
$a = 1..100
4.添加元素到数组
比如,添加4,就是$a = $a +4,添加元素用 “+”
$a = $a + (get-date)
5.combining two or more arrays
$a = 'red',"white","blue"
$b = "green","orange","yellow"
$c = $a + $b
- Stady notes: Windows powershell tips -Even More Things You Can Do With Arrays
- Stady notes: Windows powershell tips
- What things you can do in Windows Azure? (Public Cloud)
- 10 things you didn't know you can do with Unreal Engine 4
- Excel 2007 Miracles Made Easy: Mr. Excel Reveals 25 Amazing Things You Can Do with the New Excel
- 15 Things You Can Do Right Now To Help Your Career
- What things you can do in System Center VMM? (Private Cloud)
- What things you can do in System Center SM? (Private Cloud)
- Learn what you can do with Spring Boot
- can you do it
- Do more with less
- Write less code, do more things
- What can you do using Windows Azure IP?
- think more before you do!
- Things you should do after UAT
- Things You Should Never Do, Part I
- With one file handling all requests, you can centralize things such as security handling, configurat
- 【english】I can do more
- 标签数据库的设计
- CString与const char*的相互转换
- Smartforms 中更改默认编辑器的两种方法
- MFC中上下控件的使用
- CentOS下使用第三方源EPEL
- Stady notes: Windows powershell tips -Even More Things You Can Do With Arrays
- 创建SPUser时,权限级别
- 数据结构之栈
- 旋转矩阵的四元数表达法
- ns2 TORA的纠错
- Windows_批处理命令之启动\停止\重启指定服务(花生壳6.5端口映射不正常解决办法)
- 云计算平台
- 怎样走出爱恋的伤痛
- POJ 3186 Treats for the Cows