Monday, April 29, 2013

How to Loop through Enum Values in C#, Loop on Enum

enum WeekDays { Sun, Mon, Tue, Wed, Thu, Fri, Sat };

string[] days = Enum.GetNames(typeof(WeekDays));//Hear You Can Set Your Enum Type
foreach (string s in days)
{
       Console.WriteLine(s);
}

14 comments:

  1. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here.
    Best Devops training in sholinganallur
    Devops training in velachery
    Devops training in annanagar
    Devops training in tambaram

    ReplyDelete
  2. This is a nice article here with some useful tips for those who are not used-to comment that frequently. Thanks for this helpful information I agree with all points you have given to us. I will follow all of them.
    Selenium training in Chennai
    Selenium training in Bangalore
    Selenium training in Pune
    Selenium Online training

    ReplyDelete
  3. I have been meaning to write something like this on my website and you have given me an idea. Cheers.
    python Training in Pune
    python Training in Chennai
    python Training in Bangalore

    ReplyDelete
  4. I found your blog while searching for the updates, I am happy to be here. Very useful content and also easily understandable providing.. Believe me I did wrote an post about tutorials for beginners with reference of your blog. 
    microsoft azure training in bangalore
    rpa training in bangalore
    best rpa training in bangalore
    rpa online training

    ReplyDelete
  5. Irrespective of rankings, this will help in huge traffic generation, on your website, over time and, in turn,will steadily increase the number of potential customers for your products and services.

    hardware and networking training in chennai

    hardware and networking training in velachery

    xamarin training in chennai

    xamarin training in velachery

    ios training in chennai

    ios training in velachery

    iot training in chennai

    iot training in velachery

    ReplyDelete
  6. Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.




    oracle training in chennai

    oracle training in annanagar

    oracle dba training in chennai

    oracle dba training in annanagar

    ccna training in chennai

    ccna training in annanagar

    seo training in chennai

    seo training in annanagar

    ReplyDelete
  7. This post is so interactive and informative.keep update more information...
    SEO Training in Tambaram
    SEO Training in ChennaiS

    ReplyDelete