Advertisement
Heidel

Untitled

Jul 5th, 2013
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.35 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Test
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             Console.WriteLine(GetFruitCount.ToString());
  10.         }
  11.     }
  12.  
  13.     public class Test
  14.     {
  15.         enum Fruits { Apple, Orange, Peach }
  16.         public int FruitCount = Enum.GetValues(typeof(Fruits)).Length;
  17.         public int GetFruitCount()
  18.         {
  19.             return FruitCount;
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement