javaScript和C#语法对比

//javaScript中类的定义
Class1=func()//类的定义
{
    this.name='';//类的私有变量
}
Class1.prototype.Method1=func()//类class共有方法
{
    var a='';//方法Method1的私有变量
}
//C#中类的定义
public class Class1
{
    private string name='';//类的私有变量
    public void Method1()//共有方法的定义
    {
        string a="";//方法的私有变量
    }
}
posted @ 2008-05-08 10:01  kuailewangzi1212  阅读(495)  评论(2编辑  收藏  举报