Cuemon .NET Framework
TryParse(String,GuidFormats,Guid) Method

The GUID to convert.
A bitmask comprised of one or more GuidFormats that specify how the GUID parsing is conducted.
The structure that will contain the parsed value.
Converts the string representation of a GUID to its equivalent System.Guid structure.
Syntax
'Declaration
 
Public Overloads Shared Function TryParse( _
   ByVal value As String, _
   ByVal format As GuidFormats, _
   ByRef result As Guid _
) As Boolean
public static bool TryParse( 
   string value,
   GuidFormats format,
   out Guid result
)

Parameters

value
The GUID to convert.
format
A bitmask comprised of one or more GuidFormats that specify how the GUID parsing is conducted.
result
The structure that will contain the parsed value.

Return Value

true if the parse operation was successful; otherwise, false.
Remarks
This method returns false if value is null or not in a recognized format, and does not throw an exception.
Only 32 digits (GuidFormats.NumberFormat); 32 digits separated by hyphens (GuidFormats.DigitFormat); 32 digits separated by hyphens, enclosed in brackets (GuidFormats.BraceFormat) and 32 digits separated by hyphens, enclosed in parentheses (GuidFormats.ParenthesisFormat) is supported.
For more information refer to this page @ StackOverflow: http://stackoverflow.com/questions/968175/what-is-the-string-length-of-a-guid
Requirements

Target Platforms: Windows 8, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

GuidUtility Class
GuidUtility Members
Overload List

 

 


| Cuemon is licensed under a The MIT License (MIT)



© 2009-2015 Weubphoria. All Rights Reserved.

Documentation made easy with Document! X by Innovasys

Send Feedback