VB.NET  •  Create an Enum Type

Listing 2. This code creates a new Enum type useful for choosing the image output type. The control provides three output types: Book, Music, and Generic.

Public Enum OutputType
   Generic
   Music
   Book
End Enum

<Bindable(True), Category("Appereance"), _
   DefaultValue("OutputType.Generic"), _
   Description( _
   "Choose the image type you want to display.")> _
   Property Type() As OutputType
      Get
         Return m_otType
      End Get
      Set(ByVal Value As OutputType)
         m_otType = Value
      End Set
   End Property