Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / January 2005

Tip: Looking for answers? Try searching our database.

Syntax/Mean of the following

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kevininstructor@state.or.us - 10 Jan 2005 16:42 GMT
I have seen the following code, specifially an object or reference will be
surrounded with square brackets and can not find any documentation to
explain the syntax for the usage. Can someone tell me the reasoning behind
this?

Thanks
Kevin
[Assembly] i.e.
Dim asm As System.Reflection.[Assembly] =
System.Reflection.[Assembly].GetExecutingAssembly()

or

For Each a As [Assembly] In AppDomain.CurrentDomain.GetAssemblies
   PopulateAssemblySummary(a)
Next

or
[string]

Public Function Compare(ByVal x As Object, ByVal y As Object) As Integer
Implements IComparer.Compare
           Dim intResult As Integer = _
               [String].Compare(CType(x,
ListViewItem).SubItems(_intCol).Text, _
               CType(y, ListViewItem).SubItems(_intCol).Text)

           If _IsAscending Then
               Return intResult
           Else
               Return -intResult
           End If
       End Function
Chris R. Timmons - 10 Jan 2005 16:56 GMT
> I have seen the following code, specifially an object or
> reference will be surrounded with square brackets and can not
> find any documentation to explain the syntax for the usage. Can
> someone tell me the reasoning behind this?

Kevin,

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbls7/html/vblr
fVBSpec2_2.asp


or

http://tinyurl.com/44oub

Signature

Hope this helps.

Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/

kevininstructor@state.or.us - 10 Jan 2005 19:03 GMT
Thanks Chris!!! and the example tells all.

> > I have seen the following code, specifially an object or
> > reference will be surrounded with square brackets and can not
> > find any documentation to explain the syntax for the usage. Can
> > someone tell me the reasoning behind this?
>
> Kevin,

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbls7/html/vblr
fVBSpec2_2.asp


> or
>
> http://tinyurl.com/44oub
Greg Burns - 10 Jan 2005 18:52 GMT
Reserved keywords have to be escaped with brackets.

Greg

>I have seen the following code, specifially an object or reference will be
> surrounded with square brackets and can not find any documentation to
[quoted text clipped - 29 lines]
>            End If
>        End Function
kevininstructor@state.or.us - 10 Jan 2005 19:04 GMT
Thanks Greg, as Chris also pointed out. I wasn't sure why someone would code
that way I guess was the main reason for asking, this makes things clearer.

> Reserved keywords have to be escaped with brackets.
>
[quoted text clipped - 33 lines]
> >            End If
> >        End Function
Greg Burns - 10 Jan 2005 19:40 GMT
Sorry, missed Chris' post. Very concise.

Peter Merwood started a strange thread last month on a simliar subject that
you may want to take a look:

http://tinyurl.com/5e3mt

Greg

> Thanks Greg, as Chris also pointed out. I wasn't sure why someone would
> code
[quoted text clipped - 41 lines]
>> >            End If
>> >        End Function

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.