Search results

  1. brendan.hill

    Best way to extend XmlDocument?

    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: Public Function AddValues(paramarray NameThenValue() as object) . End Function Dim x as XmlElement . ...
  2. brendan.hill

    Question OO question: how to cast from a base class to a derived class?

    OK I know this isn't supposed to be possible, because you can't be sure the object is really of the derived class (can't cast a mammal as a cat because it might be a dog, etc). The thing is, I have a legitimate need to achieve this somehowand see no problem in this circumstance. I'm writing a...
  3. brendan.hill

    Constructing XML string by string - what do you think?

    Hi, I recently joined a new development team (developing mission critical financial services systems) and was horrified to find that they created XML using StringBuilder, and even worse sometimes, by string arrays & increments. Adjustments to XML were sometimes as terrible as stripping of last...
  4. brendan.hill

    Question Obscure problem - optional parameter with empty string treated as Nothing!?

    Weird. This code produces Nothing instead of "": Public Function get_value(Optional ByVal alternative_value As String = "") As Object Return alternative_value End Function dim d as object = get_value() Why ideas why? It should return "" instead of Nothing as that's the parameter's...
Top Bottom