Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Test
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine(GetFruitCount.ToString());
- }
- }
- public class Test
- {
- enum Fruits { Apple, Orange, Peach }
- public int FruitCount = Enum.GetValues(typeof(Fruits)).Length;
- public int GetFruitCount()
- {
- return FruitCount;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement