I would like to extend the functionality of XmlDocument and XmlElement to make it easier to add new children, multiple values at once, etc, for example this function would be useful:
What's the best way to do this? Inheriting a class from XmlDocument/XmlElement is great except the inability to cast from base class to derived class (eg. XmlElement -> XmlElementEx) means that you can't properly wrap .AppendChild() and .SelectSingleNode().
Public Function AddValues(paramarray NameThenValue() as object)
Dim x as XmlElement
x.AddValues("Name", "asdf", "Age", 13, "DateOfBirth", #1/1/1970#)
I've since actually gone with a wrapper class (contains XmlElement as a private member, then exposes just my special functions) but it would be preferable to somehow extend the XmlElement class directly without loss of functionality.
P.S. Not interested in 3rd party products