473,399 Members | 3,603 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,399 software developers and data experts.

CSharp and VB.NET object, event browser differences in UI

In VS when your working on a VB code module for a web form you can see a
list of object in the left hand drop down list above the code window and
possible events in the right hand drop down list.
In C# you only see the class name, so getting a code template for an event
is more difficult.

Is this just a difference between the two languages or is there something
I'm missing?

Cheers

Alex
Nov 15 '05 #1
2 1626

"Alex Sheppard-Godwin" <ne**@limehouse.net> wrote in message
news:ez**************@TK2MSFTNGP09.phx.gbl...
In VS when your working on a VB code module for a web form you can see a list of object in the left hand drop down list above the code window and possible events in the right hand drop down list.
In C# you only see the class name, so getting a code template for an event is more difficult.

Is this just a difference between the two languages or is there something I'm missing?


No, there is definately a difference.

In C#, if you want to stub out an event, type:

something.SomeEvent += [TAB][TAB]

This will create the event handler delegate declaration
and it will create the stub method for you.

After you type the +=, a pop-up Intellisense window
will appear telling you to press tab for the auto
declaration. You probably didn't pay attention to
it since a window similar to it, but without the
TAB key auto-stubbing used to appear in VS.NET 2002.

I had to have someone point it out to me too, so
don't feel bad you missed it :)

Likewise, when you declare your class and say
that you're implementing and interface, it will
pop-up and tell you to hit TAB to stub out all
the interface methods. I'm not sure how that works
for abstract base classes. It may work too, but
I haven't tried it recently.

-c
Nov 15 '05 #2
Also, in the designer, if you go to the window that has properties and click
on the yellow lightening bolt, you'll see a list of events for the selected
control/form. Double click on a blank event and it will create the stub for
the event for you.

--
Mike Mayer
http://www.mag37.com/csharp/
mi**@mag37.com
"Chad Myers" <cm****@N0.SP.AM.austin.rr.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...

"Alex Sheppard-Godwin" <ne**@limehouse.net> wrote in message
news:ez**************@TK2MSFTNGP09.phx.gbl...
In VS when your working on a VB code module for a web form you can see

a
list of object in the left hand drop down list above the code window

and
possible events in the right hand drop down list.
In C# you only see the class name, so getting a code template for an

event
is more difficult.

Is this just a difference between the two languages or is there

something
I'm missing?


No, there is definately a difference.

In C#, if you want to stub out an event, type:

something.SomeEvent += [TAB][TAB]

This will create the event handler delegate declaration
and it will create the stub method for you.

After you type the +=, a pop-up Intellisense window
will appear telling you to press tab for the auto
declaration. You probably didn't pay attention to
it since a window similar to it, but without the
TAB key auto-stubbing used to appear in VS.NET 2002.

I had to have someone point it out to me too, so
don't feel bad you missed it :)

Likewise, when you declare your class and say
that you're implementing and interface, it will
pop-up and tell you to hit TAB to stub out all
the interface methods. I'm not sure how that works
for abstract base classes. It may work too, but
I haven't tried it recently.

-c

Nov 15 '05 #3

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

Similar topics

8
by: Nicolas | last post by:
How do I do a RaiseEvent in csharp I'm ok in VB but csharp confused me a lot. ******* code ******** private FileSystemWatcher watcher = new FileSystemWatcher(); public delegate void...
4
by: Luke Matuszewski | last post by:
Here are some questions that i am interested about and wanted to here an explanation/discussion: 1. (general) Is the objectness in JavaScript was supported from the very first version of it (in...
26
by: yb | last post by:
Hi, Is there a standard for the global 'window' object in browsers? For example, it supports methods such as setInterval and clearInterval, and several others. I know that w3c standardized...
44
by: petermichaux | last post by:
Hi, I have been using the following line of code to create an object called "Serious" if it doesn't already exist. if (Serious == null) {var Serious = {};} This works in the scripts I use...
5
by: psycho | last post by:
can someone what are the differences between csharp 1.1 and 2.0 and I am new to csharp but i hav worked in vb.net so i am starting with CSHARP UNLEASHED. if any one knows a book or has an ebook...
5
by: jeremy | last post by:
I have an ASP.Net 2.0 application running on Windows Server 2003. The application displays properly in Internet Explorer, however, when I use a browser control embedded in a .net form, I get an...
19
by: auratius | last post by:
http://www.auratius.co.za/CSharpCodingStandards.html Complete CSharp Coding Standards 1. Naming Conventions and Styles 2. Coding Practices 3. Project Settings and Project Structure 4....
9
by: Mark Berry | last post by:
Hi, How can I determine whether an object is derived from another object? My specific example is that I have a CustomError class with several specific error types that derive from it...
6
by: lochru45 | last post by:
I'm running the following javascript with no problem in FireFox: var multiGallery = { init: function(options){ this.overlay = new...
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:
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
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
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.