473,806 Members | 2,236 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1642

"Alex Sheppard-Godwin" <ne**@limehouse .net> wrote in message
news:ez******** ******@TK2MSFTN GP09.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.SomeE vent += [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.A M.austin.rr.com > wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..

"Alex Sheppard-Godwin" <ne**@limehouse .net> wrote in message
news:ez******** ******@TK2MSFTN GP09.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.SomeE vent += [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
10107
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 Changed(WatcherChangeTypes exch); public delegate void Created(string fileName); public delegate void ReCreated(string OldName, string newName); public delegate void OverRun(string Message);
4
1889
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 browsers) ? What about the new syntax of creating a object using { 'propName1':'propValue1', 'propName2':'propValue2', 'propName3':{ /* another object */ } } - from what version of JScript/JavaScript it was supported (from what browsers versions) ?...
26
5694
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 several parts of the DOM, but this does not include the window object. Thank you
44
3393
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 it but but www.jslint.com is not happy with me.
5
1326
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 better than UNLEASHED than please help me.
5
2075
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 error and am directed to the Windows Application Event Log. The following message is logged: ------------- Source: ASP.NET 1.1.4322.0 Event ID: 1062
19
3981
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. Framework-Specific Guidelines Naming Conventions and Styles
9
3783
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 (CustomBuinessError, CustomTechnicalError, etc.). The CustomError base class has some extra fields that I want to log or display when an error is handled. I know I can check for exception types in Catch blocks. But what about in
6
4376
by: lochru45 | last post by:
I'm running the following javascript with no problem in FireFox: var multiGallery = { init: function(options){ this.overlay = new Element('div').setProperty('id','lbOverlay').injectInside(document.body).addEvent('click',this.close.bind(this)); this.gallery = new Element('div').setProperty('id','gallery').injectInside(document.body); this.fx = {
0
9718
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9596
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10617
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10370
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9186
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7649
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5545
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5678
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3008
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.