-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
55 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Array | ||
|
||
## Creation | ||
|
||
> [!NOTE] | ||
> The default type of a array literal is `object[]`, you can annotate with a type. | ||
> ```ps1 | ||
> [int[]]$foo = 1, 2, 3 | ||
> ``` |
21 changes: 21 additions & 0 deletions
21
docs/document/Powershell/docs/Object Manipulation/ETS Property.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# ETS Property | ||
|
||
Extended Type System in Powershell has 4 kinds of property: | ||
|
||
- Alias Property: An simple alias for another property. | ||
- Script Property: Getter/Setter for a custom property that can access other members, represented as a script block. | ||
- Note Property: An extra independent property added to the object. | ||
|
||
## Alias Property | ||
|
||
- Inspect Alias Property by: | ||
|
||
```ps1 | ||
gps | gm -MemberType AliasProperty | ||
``` | ||
|
||
- Add Alias Property by: | ||
|
||
```ps1 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Object Creation | ||
|
||
- Create a `.NET` type instance. | ||
- Create a `PSObject`. | ||
- Create a `PSCustomObject` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Sort | ||
|
||
|