摘要:
interface IEmployee{ string Name { get; set; } int Counter { get; }}public class Employee : IEmployee{ public static int numberOfEmployees; private string name; public string Name // read-write instance property { get { return name; } set { name = value; } } private int counter; public int Counter / 阅读全文
摘要:
using System;using System.Collections.Generic;using System.Text;namespace Example11_1 { class Program { static void Main(string[] args) { Farmer farmer = new Farmer(); farmer.Name = "Liu"; farmer.Age = 226; Console.WriteLine(farmer.Age); Console.ReadLine(); } } class Farmer { /// <summa 阅读全文