Skip to content

Commit a9edf5d

Browse files
iRon7sdwheeler
andauthored
Update docs/Rules/InvalidMultiDotValue.md
Co-authored-by: Sean Wheeler <sean.wheeler@microsoft.com>
1 parent 62a6c30 commit a9edf5d

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

docs/Rules/InvalidMultiDotValue.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,10 @@ Where both examples will result in `$null` instead of any specific object.
3535
### Correct
3636

3737
```powershell
38+
# Use type-casting with quoted value
39+
$IP = [System.Net.IPAddress]'127.0.0.1'
3840
$version = [Version]'1.2.3'
39-
# or:
40-
$version = [Version]::new(1, 2, 3)
41-
```
4241
43-
```powershell
44-
$IP = [System.Net.IPAddress]'127.0.0.1'
42+
# Use type constructor method
43+
$version = [Version]::new(1, 2, 3)
4544
```

0 commit comments

Comments
 (0)