473,788 Members | 2,868 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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*******@nospa m.nospam
Mar 1 '06 #1
7 15711
"moondaddy" <mo*******@nosp am.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*******@nospa m.nospam
"moondaddy" <mo*******@nosp am.nospam> wrote in message
news:uZ******** ******@tk2msftn gp13.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*******@nospa m.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
"Environmen t"-"Keyboard" node. Under the "Use new shortcut in" text box,
please choose the "Text Editor". Then, you can find the
"ClassDiagram.I mplementInterfa ceStubsExplicit ly" and
"ClassDiagram.I mplementInterfa ceStubsImplicit ly" 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*******@nospa m.nospam
""Yuan Ren[MSFT]"" <v-****@online.mic rosoft.com> wrote in message
news:Hy******** ******@TK2MSFTN GXA03.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
"Environmen t"-"Keyboard" node. Under the "Use new shortcut in" text box,
please choose the "Text Editor". Then, you can find the
"ClassDiagram.I mplementInterfa ceStubsExplicit ly" and
"ClassDiagram.I mplementInterfa ceStubsImplicit ly" 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*******@nosp am.nospam> wrote in message
news:OH******** ******@TK2MSFTN GP09.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*******@nosp am.nospam> wrote in message
news:OH******** ******@TK2MSFTN GP09.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
2528
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 Menu" configuration a "Shortcut" is created and pointing to the client EXE-file. The created msi-file, NETProgram.msi, works perfectly on the clients. A Start Menu shortcut is correctly created in "C:\Documents and Settings\All
4
8857
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 a form that I would like a shortcut menu on 1 control and no shortcut on any other control in the form. But the controls that have no shortcut display a default shortcut. Access help states " If you set the ShortcutMenuBar property to a value
8
8517
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 preferences. Should I simply bind the refresh feature to F5 or is there a symbolic Shortcut for refreshment? Comment: I think there must be symbolic key, because my IBM ThinkPad A31p has a refresh button which refreshes in Internet Explorer, but it...
3
2726
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 the basics of what I need to implement? I've seen all the MSDN articles on implementing events in managed C++ and I've gotten events to work without issue when implementing all the constructs
1
8009
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 filename and the desired shortcut name. Now, I find I need to open a shortcut and extract the target filename, and I don't have a clue how that is achieved. To be clear, I mostly don't understand the gory (Windows API) details of this code. So, can...
0
2273
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 application once it has been installed. I have added a condition to the User's Desktop named "DESKTOPSHORTCUT" (I have used several names, this is just the latest). In the User interface, I have added a screen with a checkbox that asks the user...
3
39365
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 scripting codes get block by some application such as Norton and McAfee. Would anyone mind give me some help or better still give me some sample code. I would prefer API calls then windows scripting host.
52
20912
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 'UselessJunkForDissassembly.IInvocableInternals.OperationValidate(string)' C:\Programming\LTM\devtools\UselessJunkForDissassembly\Class1.cs(360,27): error CS0535: 'UselessJunkForDissassembly.InvocableInternals' does not implement interface member...
5
2415
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 that inherits IMyInterface but MyDerivedClass doesn't implement method DoSomething() it inherits it from the base class MyBaseClass. So the statement that a class must implement all method in an interface that
0
9656
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
9498
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
10366
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...
0
10175
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10112
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
8993
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...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4070
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3675
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.