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

implementing an interface

hey all,
i'm trying to implement IHierarchyData interface and was wondering how do i
get the vs2005 editor to stub out the required functions?

thanks,
rodchar
Aug 6 '07 #1
6 1651
Rodchar,

Right click the interface name in the class definition and select
"implement interface". From there, a submenu will appear which will allow
you to implement the stubs explicitly or implicitly.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"rodchar" <ro*****@discussions.microsoft.comwrote in message
news:B6**********************************@microsof t.com...
hey all,
i'm trying to implement IHierarchyData interface and was wondering how do
i
get the vs2005 editor to stub out the required functions?

thanks,
rodchar

Aug 6 '07 #2
Simply add the following just after your class declaration, but after an
inherits statements:

'You either have to import the namespace the IHierarchyData belongs to
or fully qualifiy it on the next line
Implements IHierarchyData

When you hit [ENTER] at the end of typing that line, VS 2005 with create all
the stubs you need.

-Scott

"rodchar" <ro*****@discussions.microsoft.comwrote in message
news:B6**********************************@microsof t.com...
hey all,
i'm trying to implement IHierarchyData interface and was wondering how do
i
get the vs2005 editor to stub out the required functions?

thanks,
rodchar

Aug 6 '07 #3
Of course, it should be mentioned that this solution is VB.NET specific,
and will not work for C#.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Scott M." <s-***@nospam.nospamwrote in message
news:es**************@TK2MSFTNGP06.phx.gbl...
Simply add the following just after your class declaration, but after an
inherits statements:

'You either have to import the namespace the IHierarchyData belongs to
or fully qualifiy it on the next line
Implements IHierarchyData

When you hit [ENTER] at the end of typing that line, VS 2005 with create
all the stubs you need.

-Scott

"rodchar" <ro*****@discussions.microsoft.comwrote in message
news:B6**********************************@microsof t.com...
>hey all,
i'm trying to implement IHierarchyData interface and was wondering how do
i
get the vs2005 editor to stub out the required functions?

thanks,
rodchar


Aug 6 '07 #4
thanks everyone for the helpful tips.

"rodchar" wrote:
hey all,
i'm trying to implement IHierarchyData interface and was wondering how do i
get the vs2005 editor to stub out the required functions?

thanks,
rodchar
Aug 6 '07 #5
what if this was an inheritance instead of an interface would vs2005 c# still
be able to stub out required members?

"Nicholas Paldino [.NET/C# MVP]" wrote:
Rodchar,

Right click the interface name in the class definition and select
"implement interface". From there, a submenu will appear which will allow
you to implement the stubs explicitly or implicitly.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"rodchar" <ro*****@discussions.microsoft.comwrote in message
news:B6**********************************@microsof t.com...
hey all,
i'm trying to implement IHierarchyData interface and was wondering how do
i
get the vs2005 editor to stub out the required functions?

thanks,
rodchar


Aug 7 '07 #6
rodchar <ro*****@discussions.microsoft.comwrote:
what if this was an inheritance instead of an interface would vs2005 c# still
be able to stub out required members?
I think it can do so for abstract members at least, yes.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Aug 7 '07 #7

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

Similar topics

6
by: Martyn Lawson | last post by:
Hi, I am currently working as an Analyst on a .NET Web Project using ASP.NET and C#.NET. I have a couple of, at least what should be, quick questions: 1. My understanding of UML says that...
4
by: Frank J. Reashore | last post by:
Hello Everyone, I am implementing a simple interface in C# using Visual Studio .net and was quite surprised to discover that the C# compiler does NOT complain if a method on the interface is not...
3
by: Frans Bouma | last post by:
Hi, I have a serious problem with VB.NET and a DataTable derived class and I can't figure out how to solve it. I have implemented it in C# where it works perfectly, but I can't port one...
0
by: Yatin Bhuta | last post by:
Hi, I have an interface in vb 6.0. It has a property set member, which takes a parameter by reference. When I try to implement this interface in my vb.net project it gives me an error saying...
7
by: Scott M. | last post by:
In a typical class, do I need to indicate that it implements the IDisposable interface and then create a Dispose method that implements the Dispose required by the IDisposable interface or can I...
2
by: larzeb | last post by:
I receive the following error from the compiler: ScheduledInfo' must implement 'Property AddrLine1() As String' for interface 'ICASSBatch'. Implementing property must have matching...
3
by: David Veeneman | last post by:
I'm new to VB.NET, and I am translating an object model from C# to VB.NET, and I have come across an odd problem implementing an interface. The interface is a custom interface, IDrillDown, which...
0
by: ZA_AJR | last post by:
Hi All I have a class (aClass, derived from aBaseClass) with implements an interface IMyInterface. aClass also has a private member of type aNotherClass which raises various events. I would like...
6
by: Raj Wall | last post by:
Hi, I am trying to implement the IEqualityComparer interface for a struct so I can use it as the Key for a Dictionary. My struct declaration has: public struct Ring : IEqualityComparer {...
5
by: koonda | last post by:
Hi all, I am a student and I have a project due 20th of this month, I mean May 20, 2007 after 8 days. The project is about creating a Connect Four Game. I have found some code examples on the...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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
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
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.