LanguagePrimitives Members

Provides script language semantics that can be used when consuming objects.

The following tables list the members exposed by the LanguagePrimitives type.

(see also Extension Methods)
 NameDescription
public methodstaticCompareOverloaded. Compares two objects. The variants of this method can be used to compare two objects by themselves, compare while ignoring case, and compare while ignoring case and providing an IFormatProvider interface.
public methodstaticConvertPSObjectToTypeConverts PSObject to resultType.
public methodstaticConvertToOverloaded. Converts an object from one type to another. The variants of this method can be used to convert the object with or without providing an IFormatProvider interface for use in the type conversion.
public methodstaticConvertTypeNameToPSTypeNameMaps a .NET or CIM type name string (e.g. SInt32) to the form expected by PowerShell users, namely "[typename]". If there is no mapping, then it returns the original string as "[UNKNOWN:typeName]". If the string to convert is null or empty then the function returns "[object]" as the default typeless type.
public methodstaticEqualsOverloaded. Determines whether two objects are equal. The variants of this method can be used to check equality of two objects by themselves, check equality while ignoring case, and check equality while ignoring case and providing an IFormatProvider interface.
public methodstaticGetEnumerableRetrieves an IEnumerable interface for an object.
public methodstaticGetEnumeratorRetrieves the IEnumerator interface of an object.
public methodstaticGetPSDataCollectionWraps an arbitrary object within a Windows PowerShell data collection of Windows PowerShell objects. Introduced in Windows PowerShell 3.0.
public methodstaticIsTrueDetermines whether the value of the specified object is true.
public methodstaticTryConvertToOverloaded. Converts a specified value without throwing exceptions if the conversion fails. The variants of this method can convert the specified value to a specified type and provide an IFormatProvider interface for type conversions.
Top

  Name Description
public extension method As  Use this method to adapt an object from a foreign app domain to a known interface in this app domain.This element is introduced in Windows PowerShell 5.0. (Defined by RequestExtensions.)
public extension method As  This is called to adapt an object from a foreign app domain to a known interface in this appDomainThis element is introduced in Windows PowerShell 5.0. (Defined by RequestExtensions.)
public extension method As  Adapts an object from a foreign app domain to a known interface in this app domain.This element is introduced in Windows PowerShell 5.0. (Defined by RequestExtensions.)
public extension method Extend  Use this method to adapt and extend an object so that you can pass it to a foreign app domain.This element is introduced in Windows PowerShell 5.0. (Defined by RequestExtensions.)
public extension method Extend  This is called to adapt and extend an object that we wish to pass to a foreign app domainThis element is introduced in Windows PowerShell 5.0. (Defined by RequestExtensions.)
public extension method Extend  Used to extend an object with an interface from a foreign app domain.This element is introduced in Windows PowerShell 5.0. (Defined by RequestExtensions.)
public extension method ToEnumerable  This element is introduced in Windows PowerShell 5.0. (Defined by CollectionExtensions.)
Top


Show: