Home All Groups Group Topic Archive Search About

In vb dot net, what is the syntax to see if something is a string?

Author
5 Sep 2006 5:33 PM
tom c
In vb dot net, what is the syntax to see if something is a string?  For
example, if I read FieldX from a table I want to do something like:

If FieldX is string then
   'Do something
end if

except I know "is string" is not correct.  What is the correct syntax?

Author
5 Sep 2006 5:56 PM
Mattias Sjögren
>except I know "is string" is not correct.  What is the correct syntax?

If TypeOf FieldX Is String Then


Mattias

--
Mattias Sjögren [C# MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Author
5 Sep 2006 5:58 PM
Michael Nemtsev
Hello Tom,

use Regexp for this
See there http://regexlib.com/Search.aspx?k=string for expressions

TC> In vb dot net, what is the syntax to see if something is a string?
TC> For example, if I read FieldX from a table I want to do something
TC> like:
TC>
TC> If FieldX is string then
TC> 'Do something
TC> end if
TC> except I know "is string" is not correct.  What is the correct
TC> syntax?
TC>
---
WBR,
Michael  Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Author
5 Sep 2006 8:26 PM
Scott M.
I don't think this will help.  The OP isn't looking for strings, he's
looking to see if something is a string.


Show quote
"Michael Nemtsev" <nemt***@msn.com> wrote in message
news:1799a79b3aa0968c89f4d80f5b06c@msnews.microsoft.com...
> Hello Tom,
>
> use Regexp for this
> See there http://regexlib.com/Search.aspx?k=string for expressions
>
> TC> In vb dot net, what is the syntax to see if something is a string?
> TC> For example, if I read FieldX from a table I want to do something
> TC> like:
> TC> TC> If FieldX is string then
> TC> 'Do something
> TC> end if
> TC> except I know "is string" is not correct.  What is the correct
> TC> syntax?
> TC> ---
> WBR,
> Michael  Nemtsev :: blog: http://spaces.msn.com/laflour
>
> "At times one remains faithful to a cause only because its opponents do
> not cease to be insipid." (c) Friedrich Nietzsche
>
>

AddThis Social Bookmark Button