Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / August 2007

Tip: Looking for answers? Try searching our database.

implementing an interface

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rodchar - 06 Aug 2007 21:04 GMT
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
Scott M. - 06 Aug 2007 21:12 GMT
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

> hey all,
> i'm trying to implement IHierarchyData interface and was wondering how do
[quoted text clipped - 3 lines]
> thanks,
> rodchar
Nicholas Paldino [.NET/C# MVP] - 06 Aug 2007 21:17 GMT
Of course, it should be mentioned that this solution is VB.NET specific,
and will not work for C#.

Signature

         - Nicholas Paldino [.NET/C# MVP]
         - mvp@spam.guard.caspershouse.com

> Simply add the following just after your class declaration, but after an
> inherits statements:
[quoted text clipped - 15 lines]
>> thanks,
>> rodchar
Nicholas Paldino [.NET/C# MVP] - 06 Aug 2007 21:12 GMT
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.

Signature

         - Nicholas Paldino [.NET/C# MVP]
         - mvp@spam.guard.caspershouse.com

> hey all,
> i'm trying to implement IHierarchyData interface and was wondering how do
[quoted text clipped - 3 lines]
> thanks,
> rodchar
rodchar - 07 Aug 2007 21:24 GMT
what if this was an inheritance instead of an interface would vs2005 c# still
be able to stub out required members?

> Rodchar,
>
[quoted text clipped - 9 lines]
> > thanks,
> > rodchar
Jon Skeet [C# MVP] - 07 Aug 2007 22:12 GMT
> 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.

Signature

Jon Skeet - <skeet@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

rodchar - 06 Aug 2007 21:18 GMT
thanks everyone for the helpful tips.

> 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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.