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

shortcut key to implement interface

If I'm in a class that inherits an interface, is there a shortcut key that
will write the implementation of the interface into the class? I remember
seeing something like this in vb.net.

Thanks.

--
mo*******@nospam.nospam
Mar 1 '06 #1
7 15543
"moondaddy" <mo*******@nospam.nospam> a écrit dans le message de news:
uZ**************@tk2msftngp13.phx.gbl...

| If I'm in a class that inherits an interface, is there a shortcut key that
| will write the implementation of the interface into the class? I remember
| seeing something like this in vb.net.

Right-click on the interface name in the class declaration, it will allow
you to implement the interface either implicitly or explicitly.

Joanna

--
Joanna Carter [TeamB]
Consultant Software Engineer
Mar 1 '06 #2
OK I found the text below in MSDN, however, this is only when you are first
declaring the class. Is there a shortcut key you can use after the fact?
IntelliSense provides an option to help you implement an interface (C#
Reference) while working in the Code Editor.

Remarks

Normally, to implement an interface properly you must create a method
declaration for every member of the interface in your class. Using
IntelliSense, after you type the name of an interface in a class
declaration, a smart tag is displayed.

The smart tag gives you the option to implement the interface automatically,
using explicit or implicit naming. Under explicit naming, the method
declarations carry the name of the interface; under implicit naming, the
method declarations do not indicate the interface to which they belong. An
explicitly named interface method can only be accessed through an interface
instance, and not through a class instance. For more information, see
Explicit Interface Implementation (C# Programming Guide).

Implement Interface will generate the minimum number of method stubs that is
required to satisfy the interface. If a base class implements parts of the
interface, then those stubs are not regenerated.

The Implement Interface option is available automatically when you add an
interface declaration to a class. For more information, see How to:
Implement Interface
--
mo*******@nospam.nospam
"moondaddy" <mo*******@nospam.nospam> wrote in message
news:uZ**************@tk2msftngp13.phx.gbl...
If I'm in a class that inherits an interface, is there a shortcut key that
will write the implementation of the interface into the class? I remember
seeing something like this in vb.net.

Thanks.

--
mo*******@nospam.nospam



Mar 1 '06 #3
Hi,

Thanks for posting!

For the current issue, as far as I know, there is no shortcut key to
implement an interface. But I suggest you use the keyboard function in
Visual Studio 2005.

This means you choose the "Tools" - "Options" and then extend the
"Environment"-"Keyboard" node. Under the "Use new shortcut in" text box,
please choose the "Text Editor". Then, you can find the
"ClassDiagram.ImplementInterfaceStubsExplicitl y" and
"ClassDiagram.ImplementInterfaceStubsImplicitl y" and just assign them a
shortcut key whatever you want.

I hope this will be helpful!

Regards,

Yuan Ren [MSFT]
Microsoft Online Support
================================================== ====
PLEASE NOTE the newsgroup SECURE CODE and PASSWORD were
updated on February 14, 2006. Please complete a re-registration process
by entering the secure code mmpng06 when prompted. Once you have
entered the secure code mmpng06, you will be able to update your profile
and access the partner newsgroups.
================================================== ====
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from this issue.
================================================== ====
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== ====

Mar 2 '06 #4
sounds good thanks.

--
mo*******@nospam.nospam
""Yuan Ren[MSFT]"" <v-****@online.microsoft.com> wrote in message
news:Hy**************@TK2MSFTNGXA03.phx.gbl...
Hi,

Thanks for posting!

For the current issue, as far as I know, there is no shortcut key to
implement an interface. But I suggest you use the keyboard function in
Visual Studio 2005.

This means you choose the "Tools" - "Options" and then extend the
"Environment"-"Keyboard" node. Under the "Use new shortcut in" text box,
please choose the "Text Editor". Then, you can find the
"ClassDiagram.ImplementInterfaceStubsExplicitl y" and
"ClassDiagram.ImplementInterfaceStubsImplicitl y" and just assign them a
shortcut key whatever you want.

I hope this will be helpful!

Regards,

Yuan Ren [MSFT]
Microsoft Online Support
================================================== ====
PLEASE NOTE the newsgroup SECURE CODE and PASSWORD were
updated on February 14, 2006. Please complete a re-registration process
by entering the secure code mmpng06 when prompted. Once you have
entered the secure code mmpng06, you will be able to update your profile
and access the partner newsgroups.
================================================== ====
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from this issue.
================================================== ====
This posting is provided "AS IS" with no warranties, and confers no
rights.
================================================== ====

Mar 2 '06 #5
Hi,

You are welcome:)

Regards,

Yuan Ren [MSFT]
Microsoft Online Support
================================================== ====
PLEASE NOTE the newsgroup SECURE CODE and PASSWORD were
updated on February 14, 2006. Please complete a re-registration process
by entering the secure code mmpng06 when prompted. Once you have
entered the secure code mmpng06, you will be able to update your profile
and access the partner newsgroups.
================================================== ====
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from this issue.
================================================== ====
This posting is provided "AS IS" with no warranties, and confers no
rights.
================================================== ====

Mar 2 '06 #6

"moondaddy" <mo*******@nospam.nospam> wrote in message
news:OH**************@TK2MSFTNGP09.phx.gbl...
OK I found the text below in MSDN, however, this is only when you are
first declaring the class. Is there a shortcut key you can use after the
fact?


In VS2005 it works anytime.
Just click on the interface name and a little "thingy" appears under the
"I".
Hover over that and a menu "thingy" appears.

If you have 2003 - tough - it's a pain isn't it.
Mar 2 '06 #7

"moondaddy" <mo*******@nospam.nospam> wrote in message
news:OH**************@TK2MSFTNGP09.phx.gbl...
OK I found the text below in MSDN, however, this is only when you are
first declaring the class. Is there a shortcut key you can use after the
fact?


No it is anytime - just click on the interface name - UNLESS you are using
VS2003
Mar 4 '06 #8

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

Similar topics

2
by: Benjamin | last post by:
I have a very strange problem. I have developed a .NET solution. To set up user clients I have also included a "Deployment Project" in the solution: Using "File System Editor | User's Program...
4
by: Salad | last post by:
A97. If you set a forms properties to ShortcutMenu = No, the entire form is disabled from displaying a shortcut menu. If you set the property to Yes, all controls have a shortcut menu. I have...
8
by: Henrik Dahl | last post by:
Hello! I would like to introduce a keyboard shortcut for refreshing the user interface in many programs. In english locales it's often F5 which is used, but how about other locales and/or...
3
by: Brett Hall | last post by:
I have a VB.NET interface that my managed C++ code is to implement. I seem to be stuck implementing an event defined in that interface. Does anyone have a simple code snippet that will show me...
1
by: Steve M | last post by:
Below is some code adapted from something I think was written by Mark Hammond. Originally I needed to create a Windows shortcut (link), and this code does the trick, requiring only the target...
0
by: peter.bittner | last post by:
I have developed a Windows application in Visual Studio .NET 2003 and created a Setup project for it. In the File System Editor I have added a shortcut to the User's Desktop folder to point to the...
3
by: thi | last post by:
Hi, How do i create an application shortcut on desktop programmically in C#? I have done some shortcut coding before in visual basic 6 using windows scripting host but later found out that...
52
by: Ben Voigt [C++ MVP] | last post by:
I get C:\Programming\LTM\devtools\UselessJunkForDissassembly\Class1.cs(360,27): error CS0535: 'UselessJunkForDissassembly.InvocableInternals' does not implement interface member...
5
by: Tony Johansson | last post by:
Hello! Assume you have the following interface and classes shown below. It is said that a class must implement all the methods in the interface it inherits. Below we have class MyDerivedClass...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.