implementing an interface

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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,

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.
 
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
 
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
 
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.
 
Back
Top