-
Why Bracketed [TYPES] ?
Hi all,
In some of microsofts code examples when they declare a new variable they
put brackets around the type. For example:
Dim sendBytes As [Byte]() = Encoding.ASCII.GetBytes(responseString)
^ ^
Do you know why this is?
Thanks,
Danny
-
Re: Why Bracketed [TYPES] ?
Not sure "why" in all cases, but the brackets allow you to use reserved
words in your application. For instance:
Public Property [Stop] As Boolean
will not compile if you do not have the brackets. But I think you could see
where it might be nice to have a property (or sub or function) named Stop.
HTH
David
"Danny" <vb.@127.0.0.1> wrote in message news:3cf921fa$1@10.1.10.29...
>
> Hi all,
> In some of microsofts code examples when they declare a new variable they
> put brackets around the type. For example:
>
> Dim sendBytes As [Byte]() = Encoding.ASCII.GetBytes(responseString)
> ^ ^
>
> Do you know why this is?
> Thanks,
> Danny
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks