Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Class inheritance issue with XmlNodeList

Class inheritance issue with XmlNodeList

Scheduled Pinned Locked Moved C#
helpxmloop
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    econner
    wrote on last edited by
    #1

    Hello, I am attempting to create a custom class that is inherited from XmlNodeList. public class MyNLClass : XmlNodeList { public string MyFunction(string name) { } } I would like to add a few additional functions. when I create class, I am getting errors like: MyNLClass' does not implement inherited abstract member 'System.Xml.XmlNodeList.Count.get' MyNLClass' does not implement inherited abstract member 'System.Xml.XmlNodeList.GetEnumerator()' MyNLClass' does not implement inherited abstract member 'System.Xml.XmlNodeList.Item(int)' Any help would be appreciated. Thanks

    N 1 Reply Last reply
    0
    • E econner

      Hello, I am attempting to create a custom class that is inherited from XmlNodeList. public class MyNLClass : XmlNodeList { public string MyFunction(string name) { } } I would like to add a few additional functions. when I create class, I am getting errors like: MyNLClass' does not implement inherited abstract member 'System.Xml.XmlNodeList.Count.get' MyNLClass' does not implement inherited abstract member 'System.Xml.XmlNodeList.GetEnumerator()' MyNLClass' does not implement inherited abstract member 'System.Xml.XmlNodeList.Item(int)' Any help would be appreciated. Thanks

      N Offline
      N Offline
      neroknights
      wrote on last edited by
      #2

      The XmlNodeClass is cannot be created. Notice that the constructor is protected. Therefore this class was meant to be inherited from. Basically the class is essentially abstract and so are the members for which you are receiving errors. Therefore, if you inherit from this class, you must implement all methods and properties that are abstract on this class. ie you must define these methods in your class. That is why you are getting the above errors. It's complaining that you haven't implemented them.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups