How can I view enum's in the watch window as either their integer value or string representation?

Comments

4 comments

  • Avatar
    Michael Johnson

    Can you cast it to an int in the watch window e.g (int)myenum

     

    Regards

    Michael

    0
    Comment actions Permalink
  • Avatar
    Darcy Williams

    Hi Michael, absolutely, that was the work-around mentioned above.  It's definitely a work around though as when dealing with complex structures with many different variable types, containing many enums, to have to go through and individually cast each enum is very slow.  Then we also have large arrays of those structures, which means that each time I try to look at the values within an element I have to cast the enums just for that element. 

    It really is a great feature.  Maybe there could be an option along the lines of x2, x8, x10, x16, xE (for enum), which could then be used to override all enum's in an array or structure to x10/x16 and/or back to xE?

    Thanks

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    I'll have a look at improving this.

     

    Regards

    Michael

    0
    Comment actions Permalink
  • Avatar
    Darcy Williams

    Brilliant, thanks

    0
    Comment actions Permalink

Please sign in to leave a comment.