2015年11月9日 星期一

C7_12 用讀寫方法封裝Person

using System;

public class Person
{
    private string s_name;
    private int i_age;
    ///
    ///寫入方法
    ///
    ///        p.SetAge(23);
        //讀數據
        Console.WriteLine("{0},{1}",p.GetName(),p.GetAge());
    }
}

沒有留言: