public static Partition Parse(
ReadOnlySpan<char> s,
IFormatProvider? provider
)
Public Shared Function Parse (
s As ReadOnlySpan(Of Char),
provider As IFormatProvider
) As Partition
public:
static Partition^ Parse(
ReadOnlySpan<wchar_t> s,
IFormatProvider^ provider
)
static member Parse :
s : ReadOnlySpan<char> *
provider : IFormatProvider -> Partition
The input must use the format "size", "label:size", "size[fs]" or "label:size[fs]", where "label" is the volume label, "size" is a value using multiple-byte units, and "fs" is the name of a supported file system such as "FAT32" or "NTFS". Examples are "Windows:128GB" and "Data:16GB[FAT32]"
Instead of an explicit size, you can use "*" for the size to indicate the partition should be extended to fill the remaining space on the disk. For example, "Windows:*".
Certain volume labels are treated specially, and can be used to create special partition types. "System" creates a partition with PartitionTypeSystem, "MSR" with PartitionTypeMsr, and "WinRE" and "Recovery" with PartitionTypeUtility. This check is case insensitive, and all other volume labels create a partition with PartitionTypeNormal.
FormatException | s is not in the correct format. |
OverflowException | s contains a partition size that is not representable as a BinarySize. |