How check to see if string converts to Guid ok?

  • Thread starter Thread starter Ronald S. Cook
  • Start date Start date
R

Ronald S. Cook

I want to pass a string to a function:

Function IsGuid(ByVal value As String) As Boolean
....
End Function

Can anyone tell me what goes in the function?

What about:

Function IsBoolean(ByVal value As String) As Boolean
....
End Function

Thanks for any help.
 
I want to pass a string to a function:

Function IsGuid(ByVal value As String) As Boolean
...
End Function

Can anyone tell me what goes in the function?

What about:

Function IsBoolean(ByVal value As String) As Boolean
...
End Function

Thanks for any help.

For the Guid I say a simple Try...Catch statement would work fine. For
the Boolean, just use Boolean.TryParse(...)

Thanks,

Seth Rowe [MVP]
http://sethrowe.blogspot.com/
 
Back
Top