Skip to content

Commit 16dcc80

Browse files
committed
DiskInfo: Display disk serial number in Disk properties
1 parent 52c3cf0 commit 16dcc80

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

DynamicDiskPartitioner/Helpers/DiskInfo.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (C) 2016 Tal Aloni <[email protected]>. All rights reserved.
1+
/* Copyright (C) 2016-2019 Tal Aloni <[email protected]>. All rights reserved.
22
*
33
* You can redistribute this program and/or modify it under the terms of
44
* the GNU Lesser Public License as published by the Free Software Foundation,
@@ -21,6 +21,8 @@ public static string GetDiskInformation(Disk disk)
2121
{
2222
PhysicalDisk physicalDisk = (PhysicalDisk)disk;
2323
builder.AppendLine(physicalDisk.Description);
24+
builder.AppendLine("S/N: " + physicalDisk.SerialNumber);
25+
builder.AppendLine();
2426
}
2527
builder.AppendFormat("Size: {0} bytes\n", disk.Size.ToString("###,###,###,###,##0"));
2628
builder.AppendFormat("Bytes per sector (logical): {0}\n", disk.BytesPerSector);

0 commit comments

Comments
 (0)