Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Program
- {
- static void Main ( string [] args )
- {
- Person b = new Person ("Abdulla",155, PersonBehavior.aggressive );
- }
- public enum PersonBehavior
- {
- aggressive, passive, polite
- }
- class Person
- {
- public string Name;
- public int Age;
- PersonBehavior Behavior;
- public Person ( string name, int age, PersonBehavior behavior )
- {
- Name = name;
- Age = age;
- Behavior = behavior;
- }
- public PersonBehavior ShowBehavior ( PersonBehavior behavior )
- {
- return behavior;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment