OKIEWARDOYO

C#.NET No.11-3

Dec 21st, 2012
3,589
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.25 KB | None | 0 0
  1.         // get value user provided
  2.         string volString = Console.ReadLine();
  3.         int volInt = Int32.Parse(volString);
  4.  
  5.         // perform explicit cast from
  6.         // int to Volume enum type
  7.         Volume myVolume = (Volume)volInt;
Advertisement
Add Comment
Please, Sign In to add comment