Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace OOP1
- {
- class Human
- {
- private string name;
- private int age;
- private double temp;
- public const double GOLDEN = 2.71;
- public static int counter = 0;
- private static string nationality = "Bulgarian";
- public string Name
- {
- get { return name;}
- set { this.name = value;}
- }
- public int Age
- {
- get { return age; }
- set { this.age = value; }
- }
- public Human(string name, int age)
- {
- this.name = name;
- this.age = age;
- counter += 1;
- }
- public void introduceYourSelf()
- {
- Console.WriteLine("My name is {0} and I am {1} years old! I am {2}! And I knwo the Golden = {3}", name, age, nationality, Human.GOLDEN);
- }
- public static void SetNationality(string nat)
- {
- nationality = nat;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement