title: Enum.ToString("g") in objective-c
body: <p>In c#, you declare an enum and can print it's literal by using the <code>enumVariable.ToString("g")</code>
  what is the command in objective-c to do this</p>
  
  <p>for example in c# i can write the following:</p>
  
  <pre><code>class Sample 
  {
      enum Colors {Red, Green, Blue, Yellow = 12};
  
      public static void Main() 
      {
         Colors myColor = Colors.Yellow;
         Console.WriteLine("myColor.ToString(\"d\") = {0}", myColor.ToString("d"));         
         Console.WriteLine("myColor.ToString(\"g\") = {0}", myColor.ToString("g"));
     }
  }
  
  // This example produces the following results:
  // myColor.ToString("d") = 12
  // myColor.ToString("g") = Yellow
  </code></pre>
  
  <p>I know I can create an array of strings to hold the values or write a function with switch case but that seems a solution appropriate to a c language written in 1970 :)</p>
  
  <p>If you know of an elegant solution please let me know.</p>