BrandonSpendlove

Neater Intel CPU Codenames in the class!!! fu*k strings...

Nov 19th, 2014
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.41 KB | None | 0 0
  1. //Why you should sit and learn C# and don't dive into it like this....
  2.  
  3.     class Program
  4.     {
  5.         public static string intelBroadwell = "Broadwell";
  6.         public static string intellHaswellE = "Haswell-E";
  7.         public static string intelHaswell = "Haswell";
  8.         public static string intelIvy = "Ivy Bridge";
  9.         public static string intelSandy = "Sandy Bridge";
  10.         public static string intelClarkdale = "Clarkdale";
  11.         public static string intelLynnfield = "Lynnfield";
  12.     }
  13.  
  14. //A neater way of displaying this in code in the class can be something like:
  15.  
  16.     class Program
  17.     {
  18.         private enum ProcessorCodeNames
  19.         {
  20.             broadwell,
  21.             haswellE,
  22.             haswell,
  23.             ivyBridge,
  24.             sandyBridge,
  25.             clarkdale,
  26.             lynnfield
  27.         };
  28.  
  29.         private static Dictionary<ProcessorCodeNames, string> iCodename = new Dictionary<ProcessorCodeNames, string>()
  30.         {
  31.             {ProcessorCodeNames.broadwell,"Broadwell"},
  32.             {ProcessorCodeNames.haswellE,"Haswell-E"},
  33.             {ProcessorCodeNames.haswell,"Haswell"},
  34.             {ProcessorCodeNames.ivyBridge,"Ivy Bridge"},
  35.             {ProcessorCodeNames.sandyBridge,"Sandy Bridge"},
  36.             {ProcessorCodeNames.clarkdale,"Clarkdale"},
  37.             {ProcessorCodeNames.lynnfield,"Lynnfield"}
  38.         };
  39.     }
  40.  
  41. //Much f**king neater!!!!?!?!?!
Advertisement
Add Comment
Please, Sign In to add comment