Enumeration

  1. 3 weeks ago

    When using enumeration on a property of a class, for example, and need to save the class values we may cast:

    i = integer(globals.Fases.French)

    then the integer may be saved to SQL or any other DDBB, but when loading an integer that must be converted to an enumeration is there a similar cast?

    To avoid a method that converts the integer to the enumeration.

    Yes, you just cast it back to the enum.

    dim eLang as Globals.Fases = Globals.Fases(iValue)
  2. Tim P

    Nov 26 Pre-Release Testers Answer Rochester, NY

    Yes, you just cast it back to the enum.

    dim eLang as Globals.Fases = Globals.Fases(iValue)
  3. you mean…:

    dim eLang as Globals.Fases = Globals.Fases(i)

    Thanks

or Sign Up to reply!