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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. XML document as Resource File

XML document as Resource File

Scheduled Pinned Locked Moved C#
xmlhelpquestionlearning
2 Posts 2 Posters 2 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.
  • G Offline
    G Offline
    ganeshvijay
    wrote on last edited by
    #1

    hi Is it possible to include an XML document in a Reource File? If yes, pls help me with sample codes. Regards ganesh

    H 1 Reply Last reply
    0
    • G ganeshvijay

      hi Is it possible to include an XML document in a Reource File? If yes, pls help me with sample codes. Regards ganesh

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      Anything can be an embedded resource. Add the XML document to your project, right-click and select Properties. In the PropertyGrid, change the Build Action to Embedded Resource. Use Assembly.GetManifestResourceStream to pull it out. The root namespace of the project (in the project settings) plus any folders in which an emedded resource is located comprise it's "namespace" (as well as the default namespace for source files, though you can override this after the file is created).

      Microsoft MVP, Visual C# My Articles

      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