Results 1 to 7 of 7

Thread: What is the True Type of ihtmldomnode.childNodes

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2007
    Posts
    544

    What is the True Type of ihtmldomnode.childNodes

    It's object

    But c'mon. I know I can ctype that thing into mshtml.IHTMLDOMChildrenCollection

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: What is the True Type of ihtmldomnode.childNodes

    mshtml.DOMChildrenCollectionClass

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2007
    Posts
    544

    Re: What is the True Type of ihtmldomnode.childNodes

    Thanks. How do youi know that Penagate?

  4. #4
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: What is the True Type of ihtmldomnode.childNodes

    A little bit of experience and a little bit of Google
    http://www.dotnettech.net/BCL/VB.NET...ass/Class.aspx

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2007
    Posts
    544

    Re: What is the True Type of ihtmldomnode.childNodes

    The thing is if we press F2, the visual basic says that the type is object.

    Also http://www.dotnettech.net/BCL/VB.NET...ass/Class.aspx only says that there is a type called mshtml.DOMChildrenCollectionClass

    It doesn't say that mshtml.DOMChildrenCollectionClass is the type of children.

  6. #6
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: What is the True Type of ihtmldomnode.childNodes

    The intellisense says 'object' because it is late-bound. In theory it could be anything. In practice you know that it will be an object conforming to IHTMLDOMChildrenCollection and so you cast it as such.

    If you step through and look at the object in the IDE at run time you might get the actual type name. (I forget exactly how the VS IDE works.)

    What's the reason behind this, anyway? Curiosity, or something else?

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2007
    Posts
    544

    Re: What is the True Type of ihtmldomnode.childNodes

    Quote Originally Posted by penagate View Post
    The intellisense says 'object' because it is late-bound. In theory it could be anything. In practice you know that it will be an object conforming to IHTMLDOMChildrenCollection and so you cast it as such.

    If you step through and look at the object in the IDE at run time you might get the actual type name. (I forget exactly how the VS IDE works.)

    What's the reason behind this, anyway? Curiosity, or something else?
    I was like you guessing and guessing and I am tired of guessing.

    The object is actually system_com or something. Not ihtmldomchildrencollection. The latter is an interface.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width