次の方法で共有


LanguagePrimitives.ConvertTypeNameToPSTypeName(String) Method

Definition

BUGBUG - brucepay Mar. 2013 - I don't think this is general enough for dynamic keywords to support arbitrary target languages with arbitrary type representations so we may need an extension point here...

Maps 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 null. If the string to convert is null or empty then the function returns "[object]" as the default typeless type.

public:
 static System::String ^ ConvertTypeNameToPSTypeName(System::String ^ typeName);
public:
 static Platform::String ^ ConvertTypeNameToPSTypeName(Platform::String ^ typeName);
 static std::wstring ConvertTypeNameToPSTypeName(std::wstring const & typeName);
public static string ConvertTypeNameToPSTypeName (string typeName);
static member ConvertTypeNameToPSTypeName : string -> string
Public Shared Function ConvertTypeNameToPSTypeName (typeName As String) As String

Parameters

typeName
String

The typename string to convert.

Returns

The equivalent PowerShell representation of that type.

Applies to