Results 1 to 4 of 4

Thread: Enumeration Members

  1. #1

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Enumeration Members

    Can one loop through an enumeration in code? Or write something to get a random member of the enumeration?

    For instance. I'm testing this treeview control. Got many borderstyles. So just want to add a button and when i click it, set the borderstyle to anoter on in the Borderstyle enumeration

  2. #2

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: Enumeration Members

    foreach (string s in Enum.GetNames(typeof (System.Web.UI.WebControls.BorderStyle)))
    {
    TreeView1.BorderStyle = ...what do in do here???? System.Threading.Thread.Sleep(1000);

    }

  3. #3
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: Enumeration Members

    I moved the thread form the Codebank. The codebank is only for posting code samples, not questions.


    Has someone helped you? Then you can Rate their helpful post.

  4. #4

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: Enumeration Members

    Oh my....I must have posted it there by accident, I'm so sorry.
    Cuz after I posted it the "first time", I did not see it in the forum (C#), thought I must have messed up, and posted it again.

    Sorry hey!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width