Solved

enum question

Posted on 2011-02-19
2
426 Views
Last Modified: 2012-06-21
Hello experts :-)

enum Letters
{
   aaa,
   bbb,
   ccc
}

string a;
Letters letters;

a = "aaa";
letters = a;  //<- how can I do it?

Thank you

panJames


0
Comment
Question by:panJames
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 12

Accepted Solution

by:
Praveen Kumar earned 500 total points
ID: 34933142
string a;
Letters letters;

a = "aaa";
letters = (Letters)Enum.Parse(typeof(Letters), a, true);
0
 
LVL 12

Expert Comment

by:Praveen Kumar
ID: 34933148
Last boolean value (true above) is for Ignore case or not.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question