implementing an interface

G

Guest

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
 
S

Scott M.

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
 
N

Nicholas Paldino [.NET/C# MVP]

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.
 
N

Nicholas Paldino [.NET/C# MVP]

Of course, it should be mentioned that this solution is VB.NET specific,
and will not work for C#.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Scott M. said:
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 said:
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
 
G

Guest

what if this was an inheritance instead of an interface would vs2005 c# still
be able to stub out required members?

Nicholas Paldino said:
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]
- (e-mail address removed)

rodchar said:
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
 
J

Jon Skeet [C# MVP]

rodchar said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top