Use negated pattern.

This commit is contained in:
2022-11-14 01:20:28 +00:00
parent 6a4dea75ea
commit c4a95c40ca
14 changed files with 50 additions and 41 deletions

View File

@@ -184,7 +184,7 @@ public sealed class ImageInfoViewModel : ViewModelBase
imageFormat.Info.Heads > 0 &&
imageFormat.Info.SectorsPerTrack > 0 &&
imageFormat.Info.XmlMediaType != XmlMediaType.OpticalDisc &&
(!(imageFormat is ITapeImage tapeImage) || !tapeImage.IsTape))
(imageFormat is not ITapeImage tapeImage || !tapeImage.IsTape))
MediaGeometryText =
$"Media geometry: {imageFormat.Info.Cylinders} cylinders, {imageFormat.Info.Heads} heads, {imageFormat.Info.SectorsPerTrack} sectors per track";