Skip to content

Commit 6052d67

Browse files
committed
Remove cast
1 parent 6768b39 commit 6052d67

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Microsoft.PowerShell.Commands.Utility/commands/utility/ReadConsoleCmdlet.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ protected override void BeginProcessing()
149149
{
150150
foreach (PSObject o in result.Values)
151151
{
152-
if (MaskInput && o.BaseObject is SecureString)
152+
if (MaskInput && o.BaseObject is SecureString secureString)
153153
{
154-
WriteObject(Utils.GetStringFromSecureString((SecureString)o.BaseObject));
154+
WriteObject(Utils.GetStringFromSecureString(secureString));
155155
}
156156
else
157157
{

0 commit comments

Comments
 (0)