implementing an interface

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?cm9kY2hhcg==?=

    #1

    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
  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: implementing an interface

    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]
    - mvp@spam.guard. caspershouse.co m

    "rodchar" <rodchar@discus sions.microsoft .comwrote in message
    news:B63338DF-CD74-4F29-A923-2AA39D509952@mi crosoft.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

    Comment

    • Scott M.

      #3
      Re: implementing an interface

      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" <rodchar@discus sions.microsoft .comwrote in message
      news:B63338DF-CD74-4F29-A923-2AA39D509952@mi crosoft.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

      Comment

      • Nicholas Paldino [.NET/C# MVP]

        #4
        Re: implementing an interface

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


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

        "Scott M." <s-mar@nospam.nosp amwrote in message
        news:esCk6XG2HH A.1100@TK2MSFTN GP06.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" <rodchar@discus sions.microsoft .comwrote in message
        news:B63338DF-CD74-4F29-A923-2AA39D509952@mi crosoft.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
        >
        >

        Comment

        • =?Utf-8?B?cm9kY2hhcg==?=

          #5
          RE: implementing an interface

          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

          Comment

          • =?Utf-8?B?cm9kY2hhcg==?=

            #6
            Re: implementing an interface

            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]
            - mvp@spam.guard. caspershouse.co m
            >
            "rodchar" <rodchar@discus sions.microsoft .comwrote in message
            news:B63338DF-CD74-4F29-A923-2AA39D509952@mi crosoft.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
            >
            >
            >

            Comment

            • Jon Skeet [C# MVP]

              #7
              Re: implementing an interface

              rodchar <rodchar@discus sions.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 - <skeet@pobox.co m>
              http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
              If replying to the group, please do not mail me too

              Comment

              Working...