473,406 Members | 2,713 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,406 software developers and data experts.

Angle Brackets?

Hi,

I was wondering, can anyone tell me what statements in angle brackets are
for in VB? For example, the default
<System.Diagnostics.DebuggerStepThrough()thing that the IDE puts before
the InitializeComponent method of a form.

Apr 3 '07 #1
2 4270
Hi,
>
I was wondering, can anyone tell me what statements in angle brackets
are for in VB? For example, the default
<System.Diagnostics.DebuggerStepThrough()thing that the IDE puts
before the InitializeComponent method of a form.
The code in angle brackets in Vb.net is 1 or more 'attributes'.
These attributes confer additional information regarding the code that they
prefix.

Sometimes they are examined by the Compiler but they can also be examined
by the debbugger, The visual studio designers or your own .Net code.
They can therefore affect the behavior of any these systems.

The example you gave "<System.Diagnostics.DebuggerStepThrough()>" instructs
the debugger to pass directly over this method rather than step into it.

So for instance if you create a standard windows forms app with a single
form and then hit F11 to start it off, you will find yourself with a WinForms
app when you might have expected to have found yourself stepping through
code. If you comment out the attribute in form1.Designer.vb (or in Form1.vb
in VS2003) then you should find that starting your prog with F11 should start
debugging on the InitialiseComponent Method.

(Note the previous test and results were performed in VS2005 with the "General"
Keystroke settings)
Does this answer your question?

--
Rory
Apr 3 '07 #2
>I was wondering, can anyone tell me what statements in angle brackets
>are for in VB? For example, the default
<System.Diagnostics.DebuggerStepThrough()thing that the IDE puts
before the InitializeComponent method of a form.

The code in angle brackets in Vb.net is 1 or more 'attributes'.
These attributes confer additional information regarding the code that
they prefix.

Sometimes they are examined by the Compiler but they can also be examined
by the debbugger, The visual studio designers or your own .Net code.
They can therefore affect the behavior of any these systems.

The example you gave "<System.Diagnostics.DebuggerStepThrough()>"
instructs the debugger to pass directly over this method rather than step
into it.
So for instance if you create a standard windows forms app with a single
form and then hit F11 to start it off, you will find yourself with a
WinForms app when you might have expected to have found yourself stepping
through code. If you comment out the attribute in form1.Designer.vb (or in
Form1.vb in VS2003) then you should find that starting your prog with F11
should start debugging on the InitialiseComponent Method.

(Note the previous test and results were performed in VS2005 with the
"General" Keystroke settings)
Does this answer your question?
I think so. I wasn't clear on what (if anything) was interpreting those, but
they looked more like compiler directives than mere code.

Apr 3 '07 #3

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

Similar topics

7
by: Mxsmanic | last post by:
I have a line like this in some PHP code on my Web page: $callthis =~ s/<*>//g; When the page runs, I get this error: Parse error: parse error, unexpected '<' in /Feedback.php on line 145 ...
5
by: Darren Grant | last post by:
Hi there, I've attempted to implement an Angle class. An Angle is a subset of an integer, where the range is [0,360). All other operations should be permitted. The code works, I think......
1
by: bartek | last post by:
Hi, I'm aware that both quoted and angle-bracketed strings in an #include directive result in implementation-defined file lookup, differing in the fact that #include "foo.h" first checks...
2
by: DotNetGruven | last post by:
We have a web service that returns a string which happens to be well formed XML. The client sees the string ok, except the angle brackets are HTML encoded ( &gt and &lt ). Is this expected...
15
by: cwsullivan | last post by:
Hi gang, I have a grid full of particles in my program, and I want to find an angle between two particles. I'm having trouble because it seems like the answer depends on whether or not the target...
2
by: Kenneth Porter | last post by:
If you email your users links and wrap the links in angle brackets, beware users using Yahoo Mail. It includes the trailing angle bracket in the link, preventing it from working. (This was...
4
by: Nunzio | last post by:
I am trying to build an email address in PHP code using v5.1.2. All works well until I try to surround the email address with angle brackets. Every method I try causes the email address to...
4
by: Keith Hughitt | last post by:
Hi all, I am using someone else's script which expects input in the form of: ./script.py <arg1arg2 I was wondering if the angle-brackets here have a special meaning? It seems like they...
6
by: jeffg | last post by:
I have created a site that uses a Doctype of XHTML Transitional and a character set of utf-8, in case any of this matters. I have validated every page and cleaned up all errors. IE displays the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.