Skip to content

New GenericObject

apobekiaris edited this page Jun 15, 2020 · 2 revisions

external help file: XpandPwsh-help.xml Module Name: XpandPwsh online version: schema: 2.0.0

New-GenericObject

SYNOPSIS

Create .Net Generic Objects.

SYNTAX

New-GenericObject [[-typeName] <String>] [[-typeParameters] <String[]>] [[-constructorParameters] <Object[]>]
 [[-PredifinedType] <String>] [<CommonParameters>]

DESCRIPTION

Create .Net Generic Objects.

EXAMPLES

Example 1

PS C:\> $d=New-GenericObject -PredifinedType StringDictionary
C:\> $d.Add("key","value")
C:\> $d

Key Value
--- -----
key value

Creates a Dictionary<string,string>

PARAMETERS

-PredifinedType

{{ Fill PredifinedType Description }}

Type: String
Parameter Sets: (All)
Aliases:
Accepted values: Collection, Dictionary, DictionaryOfLists, StringDictionary

Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-constructorParameters

{{ Fill constructorParameters Description }}

Type: Object[]
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-typeName

{{ Fill typeName Description }}

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-typeParameters

{{ Fill typeParameters Description }}

Type: String[]
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

None

OUTPUTS

System.Object

NOTES

RELATED LINKS

image

image


Star the project if you think it deserves it.

GitHub stars

Fork the project to extend and contribute.

GitHub forks

Clone this wiki locally