473,473 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 1135
"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: 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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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
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
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
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...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
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.