473,511 Members | 13,105 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

[string]

I've noticed in some msdn examples that they have an object type as string..
but looks something like
hoststring as [String]...
what do the [ ] mean in vb.net
Oct 13 '08 #1
3 1032
"Brian" <bs********@community.nospamwrote in message
news:uM**************@TK2MSFTNGP03.phx.gbl...
I've noticed in some msdn examples that they have an object type as
string.. but looks something like
hoststring as [String]...
what do the [ ] mean in vb.net
The [] is an escape sequence that is used when there is a VB.NET keyword
that is overriding a framework or class keyword (name, method, etc.). In
this case, [String] is directly referencing the framework class
System.String instead of the VB String class.

Mike Ober.
Oct 13 '08 #2
Brian,

Breakets in VB means that the name can be used again.,

Like this
dim [String] as string

Not so clever but some samples on MSDN seems to be written by C++ writters.

Cor

"Brian" <bs********@community.nospamschreef in bericht
news:uM**************@TK2MSFTNGP03.phx.gbl...
I've noticed in some msdn examples that they have an object type as
string.. but looks something like
hoststring as [String]...
what do the [ ] mean in vb.net

Oct 13 '08 #3
"Michael D. Ober" <obermd.@.alum.mit.edu.nospam.schrieb:
>I've noticed in some msdn examples that they have an object type as
string.. but looks something like
hoststring as [String]...
what do the [ ] mean in vb.net
The [] is an escape sequence that is used when there is a VB.NET keyword
that is overriding a framework or class keyword (name, method, etc.). In
this case, [String] is directly referencing the framework class
System.String instead of the VB String class.
There is no "VB String class". The 'String' keyword simply maps to
'System.String'. Thus the brackets in the quoted sample are rather useless.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Oct 13 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
6704
by: Krakatioison | last post by:
My sites navigation is like this: http://www.newsbackup.com/index.php?n=000000000040900000 , depending on the variable "n" (which is always a number), it will take me anywhere on the site......
5
31156
by: Stu Cazzo | last post by:
I have the following: String myStringArray; String myString = "98 99 100"; I want to split up myString and put it into myStringArray. If I use this: myStringArray = myString.split(" "); it...
9
7987
by: John F Dutcher | last post by:
I use code like the following to retrieve fields from a form: recd = recd.append(string.ljust(form.getfirst("lname",' '),15)) recd.append(string.ljust(form.getfirst("fname",' '),15)) etc.,...
10
8147
by: Angus Leeming | last post by:
Hello, Could someone explain to me why the Standard conveners chose to typedef std::string rather than derive it from std::basic_string<char, ...>? The result of course is that it is...
2
4760
by: Andrew | last post by:
I have written two classes : a String Class based on the book " C++ in 21 days " and a GenericIpClass listed below : file GenericStringClass.h // Generic String class
29
4277
by: zoro | last post by:
Hi, I am new to C#, coming from Delphi. In Delphi, I am using a 3rd party string handling library that includes some very useful string functions, in particular I'm interested in BEFORE (return...
2
3163
by: Badass Scotsman | last post by:
Hello, Using VB and ASP,NET I would like to be able to search a STRING for a smaller STRING within, based on the characters which appear before and after. For example: String1 = " That was...
15
50145
by: morleyc | last post by:
Hi, i would like to remove a number of characters from my string (\t \r \n which are throughout the string), i know regex can do this but i have no idea how. Any pointers much appreciated. Chris
11
3035
by: ramu | last post by:
Hi, Suppose I have a string like this: "I have a string \"and a inner string\\\" I want to remove space in this string but not in the inner string" In the above string I have to remove...
8
4724
by: drjay1627 | last post by:
hello, This is my 1st post here! *welcome drjay* Thanks! I look answering questions and getting answers to other! Now that we got that out of the way. I'm trying to read in a string and...
0
7245
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7144
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7085
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7512
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5671
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4741
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3214
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1577
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
449
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.