Jay Stewart

Jay Stewart

  • NA
  • 164
  • 1.8k

Data From Defined Class

May 23 2017 9:23 AM

If I have a class 
 
  1. public enum Product : byte  
  2.         {  
  3.   
  4.               
  5.             Hammer = 1,  
  6.             Nails = 2,  
  7.             Screwdriver = 3  
  8.          }  
And want to show a messagebox that displays Hammer when its sent a 1 is this possible.?
 
Thank you  
 
  1. MessageBox.Show(Variables.Product.1)    

Answers (5)