PartitionParse(String, IFormat Provider) Method
Definition
Assembly: Ookii.AnswerFile (in Ookii.AnswerFile.dll) Version: 2.3.0+3ec3ef5391bcdf8d84abe65b91ab672cac4934d3
public static Partition Parse(
string s,
IFormatProvider? provider
)Public Shared Function Parse (
s As String,
provider As IFormatProvider
) As Partitionpublic:
static Partition^ Parse(
String^ s,
IFormatProvider^ provider
)static member Parse :
s : string *
provider : IFormatProvider -> Partition Parameters
- s String
- The string to parse.
- provider IFormatProvider
- An object that provides culture-specific formatting information about s.
Return Value
PartitionThe result of parsing s.
Implements
IParsableTSelfParse(String, IFormatProvider)Remarks
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.
Exceptions
| ArgumentNullException | s is . |
| FormatException | s is not in the correct format. |
| OverflowException | s contains a partition size that is not representable as a BinarySize. |