|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
In vb dot net, what is the syntax to see if something is a string?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? >except I know "is string" is not correct. What is the correct syntax? If TypeOf FieldX Is String ThenMattias -- Mattias Sjögren [C# MVP] mattias @ mvps.org http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com Please reply only to the newsgroup. 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 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 > > |
|||||||||||||||||||||||