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
  1. Home
  2. Web Development
  3. ASP.NET
  4. Satellite assemblies and resource files

Satellite assemblies and resource files

Scheduled Pinned Locked Moved ASP.NET
comhardwaretoolshelpquestion
2 Posts 1 Posters 0 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.
  • K Offline
    K Offline
    Krugger404
    wrote on last edited by
    #1

    Hi, I am trying to read a string from a specific resource file embedded in a satellite assembly using the resource manager. This works fine (see http://www.codeproject.com/script/comments/forums.asp?msg=2232299&forumid=12076#xx2232299xx ). I managed to use the ResourManager to read a required string in the usual way : ResourceManager.GetString("key"). However, i am looking for a way of reading all keys and values within a particular resource file at one go (e.g I want to read all the 100 entries in a resource file into a list without having to pass the "key" each time). Can you please help me on this.:doh: Thanks Krg

    K 1 Reply Last reply
    0
    • K Krugger404

      Hi, I am trying to read a string from a specific resource file embedded in a satellite assembly using the resource manager. This works fine (see http://www.codeproject.com/script/comments/forums.asp?msg=2232299&forumid=12076#xx2232299xx ). I managed to use the ResourManager to read a required string in the usual way : ResourceManager.GetString("key"). However, i am looking for a way of reading all keys and values within a particular resource file at one go (e.g I want to read all the 100 entries in a resource file into a list without having to pass the "key" each time). Can you please help me on this.:doh: Thanks Krg

      K Offline
      K Offline
      Krugger404
      wrote on last edited by
      #2

      Hi, Sorry i did find the answer myself. Its as simple as getting an Enumerator on the ResourceManager's ResourceSet. Please find the code below if this might help someday: ResourceSet resourceSet = _resManager.GetResourceSet(new CultureInfo(userLanguage), true, true); IDictionaryEnumerator eDict = resourceSet.GetEnumerator(); string x = string.Empty; while(eDict.MoveNext()) //Loop in Resource Set { x += " [" + eDict.Entry.Key + "] --> [" + eDict.Entry.Value + "]"; }

      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