kisame1313

Untitled

Jul 24th, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.54 KB | None | 0 0
  1. using System;
  2.  
  3. class Program
  4. {
  5.     static void Main ( string [] args )
  6.     {
  7.         Person b = new Person ("Abdulla",155, PersonBehavior.aggressive );
  8.     }
  9.  
  10.  
  11.         public enum PersonBehavior
  12.     {
  13.             aggressive, passive, polite
  14.         }
  15.  
  16.     class Person
  17.     {
  18.         public string Name;
  19.         public int Age;
  20.         PersonBehavior Behavior;
  21.  
  22.         public Person ( string name, int age, PersonBehavior behavior )
  23.         {
  24.             Name = name;
  25.             Age = age;
  26.             Behavior = behavior;
  27.         }
  28.  
  29.         public PersonBehavior ShowBehavior ( PersonBehavior behavior )
  30.         {
  31.             return behavior;
  32.         }
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment