Convert to switch expression.

This commit is contained in:
2022-11-13 19:59:22 +00:00
parent 55fb8416e8
commit 18c1903d2f
2 changed files with 70 additions and 120 deletions

View File

@@ -96,17 +96,12 @@ public static class CdChecksums
subchannelStatus == false)
status = false;
switch(channelStatus)
{
case null when subchannelStatus == true:
status = true;
break;
case true when subchannelStatus == null:
status = true;
break;
}
status = channelStatus switch
{
null when subchannelStatus == true => true,
true when subchannelStatus == null => true,
_ => status
};
return status;
}