PartitionTry Parse(String, IFormat Provider, Partition) Method
Definition
Assembly: Ookii.AnswerFile (in Ookii.AnswerFile.dll) Version: 2.3.0+3ec3ef5391bcdf8d84abe65b91ab672cac4934d3
public static bool TryParse(
string? s,
IFormatProvider? provider,
out Partition result
)Public Shared Function TryParse (
s As String,
provider As IFormatProvider,
<OutAttribute> ByRef result As Partition
) As Booleanpublic:
static bool TryParse(
String^ s,
IFormatProvider^ provider,
[OutAttribute] Partition^% result
)static member TryParse :
s : string *
provider : IFormatProvider *
result : Partition byref -> bool Parameters
- s String
- The string to parse.
- provider IFormatProvider
- An object that provides culture-specific formatting information about s.
- result Partition
- When this method returns, contains the result of successfully parsing s, or an undefined value on failure.
Return Value
Booleanif s was successfully parsed; otherwise, .
Implements
IParsableTSelfTryParse(String, IFormatProvider, TSelf)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.