Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7714067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:02:02+00:00 2026-06-01T02:02:02+00:00

Using C#, I need to do a reverse look up my resource file. I

  • 0

Using C#, I need to do a reverse look up my resource file. I know how to grab a string value using the ResourceManager class but I now want to do the opposite. Will I need to load the resource file into an xml file first?

The reason I want to do this is because I have some hard coded enums that are in English and my resource file contains English to Spanish keys and values. So when my code is looking for WorkflowSupport.Completed enum but the workflow returns “Terminado” rather then “Completed”, it will fail.

What I am specifically trying to do is:

I have a SharePoint workflow that returns the step the workflow is in. I have localized this workflow, so instead of returning “Completed” it will return “Terminado”. I have an enum with five hard coded values that match the various states of the workflow (Completed, Cancelled, Reassigned, Terminated and Processing). Since the workflow returns “Terminado” instead of “Completed”, the code can’t match “Terminado” to any of the enum values and fails. I want to do a reverse lookup in my resource file, so if I get a value like “Terminado” I can return
“Completed” and successfully match it to the enum member “Completed”.

If there is a better way to do this, I am all ears 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T02:02:03+00:00Added an answer on June 1, 2026 at 2:02 am

    Instead of comparing the string values of the enum you have to compare their values.

    For example, if you are working with a Combobox, you have a text and a value (numeric value of the enum) for each item, the user selects the text and you just cast the value back to your enum type.

    Are you using Forms or WPF?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For example, I rarely need: using System.Text; but it's always there by default. I
Using Python I need to insert a newline character into a string every 64
Using Python I need to delete all characters in a multiline string up to
I need to reverse geocode two locations from and to. Using the geocoder gem
I am using http://mess.genezys.net/jquery/jquery.async.php for loop and need to reverse the order of the
I need to tokenize a string and reverse it in SQL. For example if
Using Redemption I need to put a draft email in a specific Public Folder.
Using SQLite I need to copy nearly all of an existing row from a
using jquery I need to retrieve an array from table cells, format the data
I'm using Delphi and need to get the current Windows DNS server IP address

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.