How check to see if string converts to Guid ok?

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.
 
R

rowe_newsgroups

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/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top