473,320 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Syntax/Mean of the following

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


Jul 21 '05 #1
5 1133
"ke*************@state.or.us" <Ke***************@state.or.us>
wrote in news:#C**************@tk2msftngp13.phx.gbl:
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/de...fVBSpec2_2.asp

or

http://tinyurl.com/44oub

--
Hope this helps.

Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/
Jul 21 '05 #2
Reserved keywords have to be escaped with brackets.

Greg

"ke*************@state.or.us" <Ke***************@state.or.us> wrote in
message news:%2****************@tk2msftngp13.phx.gbl...
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

Jul 21 '05 #3
Thanks Chris!!! and the example tells all.

"Chris R. Timmons" <crtimmons@X_NOSPAM_Xcrtimmonsinc.com> wrote in message
news:Xn**********************************@207.46.2 48.16...
"ke*************@state.or.us" <Ke***************@state.or.us>
wrote in news:#C**************@tk2msftngp13.phx.gbl:
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/de...fVBSpec2_2.asp
or

http://tinyurl.com/44oub

--
Hope this helps.

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

Jul 21 '05 #4
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.

"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:eK**************@TK2MSFTNGP14.phx.gbl...
Reserved keywords have to be escaped with brackets.

Greg

"ke*************@state.or.us" <Ke***************@state.or.us> wrote in
message news:%2****************@tk2msftngp13.phx.gbl...
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


Jul 21 '05 #5
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
"ke*************@state.or.us" <Ke***************@state.or.us> wrote in
message news:ut**************@TK2MSFTNGP10.phx.gbl...
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.

"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:eK**************@TK2MSFTNGP14.phx.gbl...
Reserved keywords have to be escaped with brackets.

Greg

"ke*************@state.or.us" <Ke***************@state.or.us> wrote in
message news:%2****************@tk2msftngp13.phx.gbl...
>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
>
>
>
>



Jul 21 '05 #6

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

Similar topics

14
by: sam | last post by:
When I run this SQL query: SELECT u.*, o.* FROM users u, orders o WHERE TO_DAYS(o.order_date) BETWEEN TO_DAYS('2003-09-20')-10 AND TO_DAYS('2003-09-20')+10
699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
14
by: Sandy Norton | last post by:
If we are going to be stuck with @decorators for 2.4, then how about using blocks and indentation to elminate repetition and increase readability: Example 1 --------- class Klass: def...
0
by: Hallvard B Furuseth | last post by:
I haven't managed to catch up with all the decorator articles, but: If we do get the pie syntax (or | or %% or whatever), is it too late to get '@<keyword> staticmethod' and not just...
6
by: Jeff Duffy | last post by:
Hi all. I've been wondering why python itself doesn't provide a switch to check a file for valid syntax. I know that you can currently call python -c "import py_compile;...
8
by: valued customer | last post by:
What do you think is the future of efforts to reduce the "verbosity" of XSLT, ostensibly by people who have had years of experience working with this technology? (example site)...
8
by: Rich Grise | last post by:
I think I've finally found a tutorial that can get me started: http://www.zib.de/Visual/people/mueller/Course/Tutorial/tutorial.html and I've been lurking for awhile as well. What happened is,...
19
by: Nicolas Fleury | last post by:
Hi everyone, I would to know what do you think of this PEP. Any comment welcomed (even about English mistakes). PEP: XXX Title: Specialization Syntax Version: $Revision: 1.10 $...
27
by: Adam Warner | last post by:
Hi all, In the code snippet below I successfully determine the address of val1:* struct o val1=l_SYM_2B(&a).o; print_aesthetic(&val1); The structure o is heavyweight. I understand...
20
by: W Karas | last post by:
Would the fear factor for concepts be slightly reduced if, instead of: concept C<typename T> { typename T::S; int T::mem(); int nonmem(); };
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.