VB.Net Language Statement
-
Hi All; What is the difference between these two statements with uses [String} or just using String Dim myStr As [String]() = {"One", "Two", "", "Three", "Four"} And Dim myStr As String() = {"One", "Two", "", "Three", "Four"} Thanks
-
Hi All; What is the difference between these two statements with uses [String} or just using String Dim myStr As [String]() = {"One", "Two", "", "Three", "Four"} And Dim myStr As String() = {"One", "Two", "", "Three", "Four"} Thanks
They're identical statements. There is no difference. The square brackets around the term String just mean that this is an escaped name. Normally, you can't use a name that is the same as a VB reserved word, like Case or Friend. The square brackets allow you to use the name as a type name, but only if you reffer to it using the square brackets around the name. Docs on it are here[^]. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
They're identical statements. There is no difference. The square brackets around the term String just mean that this is an escaped name. Normally, you can't use a name that is the same as a VB reserved word, like Case or Friend. The square brackets allow you to use the name as a type name, but only if you reffer to it using the square brackets around the name. Docs on it are here[^]. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
Thanks for the info. :-)