locked
What is the substitute for Enum.GetNames()? RRS feed

  • Question

  • I am not finidng the GetNames() method in the Enum class for WP7. How do I substitute its functinality?
    Monday, January 31, 2011 8:06 PM

Answers

All replies

  • Here's a thread on StackOverflow that discusses some alternatives.

    Interating an Enum in Silverlight.
    Monday, January 31, 2011 10:50 PM
  • Hi Walt,

    That was a great tip. I have printed the page to One Note. I will check implementing in next few days.

    Tuesday, February 1, 2011 4:22 PM
  • Careful with that though, it turned out to be my number one source of garbage. So cache the enum values in a list and reuse that rather than creating a new one each frame (assuming you need it on a per frame basis).
    Tuesday, February 1, 2011 4:29 PM
  • Careful with that though, it turned out to be my number one source of garbage. So cache the enum values in a list and reuse that rather than creating a new one each frame (assuming you need it on a per frame basis).


    Are you doing XNA development?  I believe the OP is doing Silverlight for the project.  I'm not sure if the frame issues are the same between the two frameworks.  Your suggestion is good though and worth testing.
    Tuesday, February 1, 2011 4:35 PM