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

Method Stubs When Implementing an Inteface or inherting from Absract

Is it possible to have visual studio add the stubs for you when you
implement an interface or inherit from a an abstract class automatically.

I know this was a feature in vb.net but I can seem to work out how to do it
in C#

Thanks
Jun 27 '08 #1
5 1526
OHM ( One Handed Man ) <me@myplace.comwrote:
Is it possible to have visual studio add the stubs for you when you
implement an interface or inherit from a an abstract class automatically.

I know this was a feature in vb.net but I can seem to work out how to do it
in C#
Put the cursor anywhere in the interface name, and hit Ctrl and period.

--
Jon Skeet - <sk***@pobox.com>
Web site: http://www.pobox.com/~skeet
Blog: http://www.msmvps.com/jon.skeet
C# in Depth: http://csharpindepth.com
Jun 27 '08 #2
On Thu, 01 May 2008 15:33:36 -0700, OHM ( One Handed Man )
<me@myplace.comwrote:
Is it possible to have visual studio add the stubs for you when you
implement an interface or inherit from a an abstract class automatically.
Yes. When the cursor in the code editor is on the name of the interface
or abstract class you're implementing, if you right-click or type Ctrl-. a
menu will pop up allowing you to select whether and how to implement the
interface or abstract class (for interfaces, you can choose between
implicit and explicit implementations).

Pete
Jun 27 '08 #3
Thank you both for that , I did look for this, but couldt find it

Most gratefull - Cheers.
"Peter Duniho" <Np*********@nnowslpianmk.comwrote in message
news:op***************@petes-computer.local...
On Thu, 01 May 2008 15:33:36 -0700, OHM ( One Handed Man )
<me@myplace.comwrote:
>Is it possible to have visual studio add the stubs for you when you
implement an interface or inherit from a an abstract class automatically.

Yes. When the cursor in the code editor is on the name of the interface
or abstract class you're implementing, if you right-click or type Ctrl-. a
menu will pop up allowing you to select whether and how to implement the
interface or abstract class (for interfaces, you can choose between
implicit and explicit implementations).

Pete

Jun 27 '08 #4
On May 2, 3:53*am, "Rain" <m...@myplace.comwrote:
Thank you both for that , I did look for this, but couldt find it

Most gratefull - Cheers.

"Peter Duniho" <NpOeStPe...@nnowslpianmk.comwrote in message

news:op***************@petes-computer.local...
On Thu, 01 May 2008 15:33:36 -0700, OHM ( One Handed Man )
<m...@myplace.comwrote:
Is it possible to have visual studio add the stubs for you when you
implement an interface or inherit from a an abstract class automatically.
Yes. *When the cursor in the code editor is on the name of the interface
or abstract class you're implementing, if you right-click or type Ctrl-.a
menu will pop up allowing you to select whether and how to implement the
interface or abstract class (for interfaces, you can choose between
implicit and explicit implementations).
Pete- Hide quoted text -

- Show quoted text -
Once you type the interface name you should be getting the smart tag
on first letter, and if you click on that we get options(or use
shortcut key Shift+Alt+F10 - Implement interface and Explicitly
Implement interface - method stubs will be generated.
Jun 27 '08 #5
Strange, didnt see that. Will check it again. - Thanks
"Aneesh Pulukkul[MCSD.Net]" <an******@gmail.comwrote in message
news:9f**********************************@q27g2000 prf.googlegroups.com...
On May 2, 3:53 am, "Rain" <m...@myplace.comwrote:
Thank you both for that , I did look for this, but couldt find it

Most gratefull - Cheers.

"Peter Duniho" <NpOeStPe...@nnowslpianmk.comwrote in message

news:op***************@petes-computer.local...
On Thu, 01 May 2008 15:33:36 -0700, OHM ( One Handed Man )
<m...@myplace.comwrote:
Is it possible to have visual studio add the stubs for you when you
implement an interface or inherit from a an abstract class
automatically.
Yes. When the cursor in the code editor is on the name of the interface
or abstract class you're implementing, if you right-click or type Ctrl-.
a
menu will pop up allowing you to select whether and how to implement the
interface or abstract class (for interfaces, you can choose between
implicit and explicit implementations).
Pete- Hide quoted text -

- Show quoted text -
Once you type the interface name you should be getting the smart tag
on first letter, and if you click on that we get options(or use
shortcut key Shift+Alt+F10 - Implement interface and Explicitly
Implement interface - method stubs will be generated.
Jun 27 '08 #6

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

Similar topics

2
by: Choubey | last post by:
hi everybody, Iam a java programmer actually i want to know how the Connection object is created through DriverManager.getConnection when DriverManager class is not implements Connection...
7
by: Frans Englich | last post by:
(Picking up a side track of the "python without OO" thread.) On Wednesday 26 January 2005 11:01, Neil Benn wrote: > I say this because you do need to be aware of the > 'mythical python wand'...
2
by: Eyal | last post by:
Hey, I would appriciate if anyone can help on this one: I have a java object/inteface having a method with a boolean parameter. As I'm trying to call this method from a javascript it fails on...
24
by: Jazper | last post by:
hi i have this problem. i made a class deverted by CRootItem with implementation of IDisposable-Interface. i made a test-funktion to test my Dispose-Method.... but when set a breakpoint in my...
0
by: Ole Olsen | last post by:
Hi Ever experienced that VS looses the ability to "auto"-implement the signature of an interface? Normally when typing this ': ImyInterface', Intellisense kicks in and asks whether you want...
6
by: Alex Sedow | last post by:
Example 1 interface I { string ToString(); } public class C : I { public void f() {
7
by: Charles Law | last post by:
Sorry, but I am on a bit of a roll today. I have just found that I can make a method private to my class, but then use AddHandler in an external class to hook it up. Is that what people would...
0
by: Fredrik Strandberg | last post by:
I am trying to figure out how to organize a visual studio vb.net solution to make it possible to execute automated unit tests. I encounter problems when creating stubs. When testing an existing...
0
by: linkan56 | last post by:
I'm using stubs to unit test an existing system. I use the stubs not only as an empty shell for the real implementations, but also to control and check the behaviour of units. I have included test...
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
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
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...
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
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,...

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.