How check to see if string converts to Guid ok?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ronald S. Cook

    How check to see if string converts to Guid ok?

    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.
  • rowe_newsgroups

    #2
    Re: How check to see if string converts to Guid ok?

    On Jul 3, 5:47 pm, "Ronald S. Cook" <rc...@westinis .comwrote:
    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.TryPars e(...)

    Thanks,

    Seth Rowe [MVP]

    Comment

    Working...