DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Danny Guest

    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

  2. #2
    David Williams Guest

    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




Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


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


Sponsored Links