Results 1 to 3 of 3

Thread: XmlDocument objXMLDoc = new XmlDocument(); gives Error

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2003
    Posts
    3

    XmlDocument objXMLDoc = new XmlDocument(); gives Error

    Hello,

    I added the System.XML.dll reference to my project.
    Imports System.XML and Imports System.Xml.XmlDocument is also added to my code

    However when i type:
    XmlDocument objXMLDoc = new XmlDocument();

    I see that:
    XmlDocument, objXMLDoc and ';' got underlined in blue

    When i compile the code in Visual Studio i got the following error:
    'XmlDocument' is a type and cannot be used as an expression"

    What do i do wrong?

    Greetz

    Cheyloe

  2. #2
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Since this is a VB.NET forum, I'm going to assume you don't want to use C#.

    VB Code:
    1. Dim objXMLDoc As New XmlDocument

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2003
    Posts
    3
    So what i wrote above was C# code?
    Indeed i need VB.NET code

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