Tuesday, September 25, 2007

Property

昇級版的Field, 用起來像普通Field, 但卻有封裝
private int secrete;
選取/重整/封裝欄位
自動產生
public int Secrete
{
get { return secrete; }
set { secrete = value; }
}
使用
Demo demo = new Demo();
demo.Secrete = 3;
Console.Write(demo.Secrete);

Monday, September 24, 2007

Polymorphism

http://cdict.giga.net.tw/q/polymorphism
FOLDOC - Computing Dictionary
人物 Christopher Strachey (polymorphism, currying)

length :: [a] -> Int
overloading (operator overloadin)
The ability to use the same syntax for objects of different type
  • 10+2
  • 1.2+2.5
  • "this" + " " + "is"

C#學習之旅

C# Tutorial | wiki

Lesson 1
Main(): like main() in C, 一個專案只能有一個 Class 有 Main()
give 命令列參數in IDE, app/屬性/偵錯/起始選項/命令列的引數
還可以簽署[todo]
args[0]:取得命令列參數
C:\> a.exe 123
args[0]==123
{0}: Parameter Position Holder

Lesson 5
ref: like C & (pass by reference)
out: like VB (output variable for return more than one value)
params: 不定個數參數
f(params string[] names)

f("apple","banana","orange")

f( string[] names)
f(["apple","banana","orange"])


static void Main(string[] args)
{

string[] names = { "a", "b", "c" };
this.DemoParams("a", "b", "c");
this.WithoutParams(names);
}

this 不能用在靜態成員

Tuesday, August 21, 2007

test

test

臺灣大學博物館群

炎炎夏日何處去?來趟臺灣大學博物館之旅吧!

網址: http://www.museums.ntu.edu.tw/



臺大博物館群合作發展計畫者計有八處,分別為臺大校史館、人類學系標本陳列室、地質標本館、物理文物廳、昆蟲標本室、臺大農業陳列館、植物標本館,以及動物博物館等館室,分散於校園各處。

Sunday, July 29, 2007