PowerShell: Array Methods

By Xah Lee. Date: .
# list array methods
Get-Member -InputObject (1,2) -MemberType Method
Add
int IList.Add(System.Object value)
Address
System.Object&, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e Address(int )
Clear
void IList.Clear()
Clone
System.Object Clone(),
System.Object ICloneable.Clone()
CompareTo
int IStructuralComparable.CompareTo(System.Object other, System.Collections.IComparer comparer)
Contains
bool IList.Contains(System.Object value)
CopyTo
void CopyTo(array array, int index),
void CopyTo(array array, long index),
void ICollection.CopyTo(array array, int index)
Equals
bool Equals(System.Object obj),
bool IStructuralEquatable.Equals(System.Object other, System.Collections.IEqualityComparer comparer)
Get
System.Object Get(int )
GetEnumerator
System.Collections.IEnumerator GetEnumerator(),
System.Collections.IEnumerator IEnumerable.GetEnumerator()
GetHashCode
int GetHashCode(),
int IStructuralEquatable.GetHashCode(System.Collections.IEqualityComparer comparer)
GetLength
int GetLength(int dimension)
GetLongLength
long GetLongLength(int dimension)
GetLowerBound
int GetLowerBound(int dimension)
GetType
type GetType()
GetUpperBound
int GetUpperBound(int dimension)
GetValue
System.Object GetValue(Params int[] indices),
System.Object GetValue(int index),
System.Object GetValue(int index1, int index2),
System.Object GetValue(int index1, int index2, int index3),
System.Object GetValue(long index),
System.Object GetValue(long index1, long index2),
System.Object GetValue(long index1, long index2, long index3),
System.Object GetValue(Params long[] indices)
IndexOf
int IList.IndexOf(System.Object value)
Initialize
void Initialize()
Insert
void IList.Insert(int index, System.Object value)
Remove
void IList.Remove(System.Object value)
RemoveAt
void IList.RemoveAt(int index)
Set
void Set(int , System.Object )
SetValue
void SetValue(System.Object value, int index),
void SetValue(System.Object value, int index1, int index2),
void SetValue(System.Object value, int index1, int index2, int index3),
void SetValue(System.Object value, Params int[] indices),
void SetValue(System.Object value, long index),
void SetValue(System.Object value, long index1, long index2),
void SetValue(System.Object value, long index1, long index2, long index3),
void SetValue(System.Object value, Params long[] indices)
ToString
string ToString()

PowerShell: Array

PowerShell

Practical How-To

list files

list dirs

on dir

on file

Windows config

zip tar

misc


PowerShell in Depth

Programing PowerShell

Value Types

String

Variable

Boolean

Conditional

Data Structure

Loop and Iteration

Input/Output

Function

Profile and Script

Script Examples