From 8ab61f9745c024eb99bcddb06f0729aca0aa94c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20L=C3=B3pez-Anglada?= Date: Thu, 11 Jul 2024 20:21:34 +0200 Subject: [PATCH 1/3] More concise command line (#11253) --- .../7.4/Microsoft.PowerShell.Core/About/about_Arrays.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_Arrays.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_Arrays.md index 00199effbe5..1c8918665af 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_Arrays.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_Arrays.md @@ -1055,11 +1055,10 @@ Thursday, June 24, 2021 1:23:30 PM ``` The `set_LastWriteTime()` method is a _hidden_ member of the **FileInfo** -object. The following example shows how to find members that have a _hidden_ -`set` method. +object. The following example shows how to find _hidden_ `set` methods. ```powershell -$files | Get-Member | Where-Object Definition -like '*set;*' +$files | Get-Member -Force -Name set_* ``` ```Output From b9604d9e710160ccdb4140828d1f23472e9e4481 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20L=C3=B3pez-Anglada?= Date: Thu, 11 Jul 2024 20:29:24 +0200 Subject: [PATCH 2/3] Fix typo and reword slightly (#11252) --- reference/7.4/Microsoft.PowerShell.Core/About/about_Arrays.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_Arrays.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_Arrays.md index 1c8918665af..94ba021ca25 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_Arrays.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_Arrays.md @@ -643,7 +643,7 @@ The following example shows how to select all odd numbers from the array. 9 ``` -This example show how to select the strings that aren't empty. +The next example shows how to select all non-empty strings. ```powershell ('hi', '', 'there').Where({$_.Length}) From 47e199b825afded6c87a60fd653f3050892059dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20L=C3=B3pez-Anglada?= Date: Thu, 11 Jul 2024 21:57:32 +0200 Subject: [PATCH 3/3] Use more idiomatic example (#11251) * Use more concise example * Apply suggestions from review --------- Co-authored-by: Mikey Lombardi (He/Him) --- reference/7.4/Microsoft.PowerShell.Core/About/about_Arrays.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_Arrays.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_Arrays.md index 94ba021ca25..afde120aa57 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_Arrays.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_Arrays.md @@ -646,7 +646,7 @@ The following example shows how to select all odd numbers from the array. The next example shows how to select all non-empty strings. ```powershell -('hi', '', 'there').Where({$_.Length}) +('hi', '', 'there').Where{ $_ } ``` ```Output