英语翻译(1.)Class constructor,or type initializer,is the method specific to a type as a whole that run after the type is loaded and before any of the type's memnbers are accessed.Class constructors are used for static field initialization.Only on

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/14 03:37:49
英语翻译(1.)Class constructor,or type initializer,is the method specific to a type as a whole that run after the type is loaded and before any of the type's memnbers are accessed.Class constructors are used for static field initialization.Only on

英语翻译(1.)Class constructor,or type initializer,is the method specific to a type as a whole that run after the type is loaded and before any of the type's memnbers are accessed.Class constructors are used for static field initialization.Only on
英语翻译
(1.)
Class constructor,or type initializer,is the method specific to a type as a whole that run after the type is loaded and before any of the type's memnbers are accessed.Class constructors are used for static field initialization.Only one class constructor per type is permitted,and it cannot use the vararg(variable argument) calling convention.Normally,class constructors are never called from the IL code.If a type has a class constructor,this constructor is executed automatically after the type the type is loaded.
However,a class constructor,like any other static method,can be called explicitly.As a result of such a call,the global fields of the type are reset to their initial values.
Calling class constructor explicitly does not lead to type reloading.
(2.)
We now continue our study of object-oriented programming by explaining and demonstrating polymorphism with inheritance hierarchies.Polymorphism enables us to "program in the general" rather than "progtam in the specific."In particular,polymorphism enables us to write applications that process objects that share the same base class in a class hierarchy as if they are all objects of the base class.
(3.)
When creating a class,rather than declaring completely new members,you can designate that the new class should inherit the members of an existing class.The existing class is called the base class,and the new class is the derived class.Each derived class can become the base class for future derived classes.
A derived class normally adds its own fields and methods.Therefore,a derived class is more specific than is base class and represents a more specialized group of objects.Typically the derived class exhibits the behaviors of its base class and additional behaviors that are specific to the derived class.
(4.)
With polymorphism,we can design and implememt systems that are easily extensiblenew classes can be added with little or no modification to the general portions of the application,as long as the new classes are part of the inheritance hierarchy that the application processes generically.The only parts of an application that must be altered to accommodate new classes are those that require direct konwledge of the new classes that the programmer adds to the hierarchy.
(5.)
Properties allow clients to access class state as if they were accessing member fields directly,while actually implementing that access through a class method.
This is ideal.The client wants direct access to the state of the object and doesn't want to work with methods.The class designer,however,wants to hide the internal state of his class in class members,and provide indirect access through a method.
请 不要直接用 翻译软件 好么- -
一看楼下就知道是用金山直接翻译的。

英语翻译(1.)Class constructor,or type initializer,is the method specific to a type as a whole that run after the type is loaded and before any of the type's memnbers are accessed.Class constructors are used for static field initialization.Only on
(1.)
类构造函数,或键入初始,该方法是特定于载入后的键入和再键入数据被处理前.类构造函数被用于静态初始领域.只有每个类型的类的构造函数是被允许的,而且不能使用可变参数(可变参数)呼叫常规.通常地,类构造函数永远不会从IL代码召出.如果类型被称为是有阶级性的构造,加载后会自动执行此构造类型.
然而,一种类构造函数,像任何其他的静态方法,可称为明确.正是这样的召出结果,该类型的全球字段重置为它们的初始值.
调用类的构造明确不会导致类型的重新载入.
(2.)
我们现在继续我们的研究对象的解释和示范继承性等级.多态性与面向对象编程,使我们能够“计划一般”而不是“在特定的程序.”特别是多态性使我们能够编写应用程序的进程对象,共享在一个类层次结构相同的基类,似乎是基类的所有对象.
(3.)
当创建而不是完全成为新成员的类,您可以指定新的类应该继承现有类.现有的类称为基类的成员,新的类是派生类.每个派生类可以成为未来的派生类的基类.
派生类,通常添加自己的领域和方法.因此,派生类比基类更具体,代表了对象.通常来说派生类展示基类和其他行为的行为特定于派生类.
(4.)
有了多态性,我们可以设计和执行系统,很容易扩展.新的类可以添加很少或根本没有修改应用程序的一般部分,只要新的类的继承层次,应用程序进程的一部分,通常只有一个必须改变,以适应新的类申请的部分是那些需要的新类的直接产品知识,程序员增加到层次结构.
(5.)
属性允许客户端访问类的状态好像他们是直接访问成员字段,而实际执行,通过一类方法访问.
这是理想的.客户要直接访问对象的状态,不想用方法去访问.但是类设计器想要掩盖它在类成员的类的内部状态,并提供间接获得通过方法.

(1。)
类构造函数,或类型初始,该方法是特定于整个类型的类型后运行前加载该类型的memnbers任何一个accessed.Class静态构造函数领域使用initialization.Only每个类型的类的构造函数允许的,而且不能使用可变参数(可变参数)致电convention.Normally,类构造函数永远不会从白介素code.If类型称为是有阶级性的构造,执行此构造类型后加...

全部展开

(1。)
类构造函数,或类型初始,该方法是特定于整个类型的类型后运行前加载该类型的memnbers任何一个accessed.Class静态构造函数领域使用initialization.Only每个类型的类的构造函数允许的,而且不能使用可变参数(可变参数)致电convention.Normally,类构造函数永远不会从白介素code.If类型称为是有阶级性的构造,执行此构造类型后加载型自动。
然而,一类的构造函数,像任何其他的静态方法,可称为explicitly.As了这样的呼吁的结果,该类型的全球字段重置为它们的初始值。
调用类的构造明确不会导致类型子弹。
(2。)
我们现在继续我们的研究对象的解释和示范继承hierarchies.Polymorphism多态性与面向对象编程,使我们能够“计划一般”而不是“progtam在特定的。”特别是,多态性使我们能够编写应用程序的进程对象共享在一个类层次结构相同的基类,好像是基类的所有对象。
(3。)
当创建宣布完全不是一类的新成员,您可以指定新的类应该继承现有class.The现有的类称为基类的成员,新的类是派生class.Each派生类可以成为未来派生类的基类。
派生类,通常添加自己的领域methods.Therefore,派生类的更具体的比基类,代表了objects.Typically派生类的展品更专业组的基类和其他行为的行为所特有的派生类。
(4。)
随着多态性,我们可以设计和implememt系统,很容易extensiblenew类可以添加很少或根本没有修改应用程序的一般部分,只要新的类的继承层次,应用程序进程的一部分,只有generically.The一个必须改变,以适应新的类申请的部分是那些需要的新类的直接产品知识,程序员增加了层次结构。
(5。)
属性允许客户端访问类的状态好像他们是直接访问成员字段,而实际执行,通过一类方法访问。
这是ideal.The客户要直接访问对象的状态,不希望同methods.The类设计器,但是,想掩盖他在类成员的类的内部状态,并提供间接获得通过方法。
希望对你有帮助,

收起

(1。)
类构造函数,或类型初始,该方法是特定于整个类型的类型后运行前加载该类型的任何一个.静态构造函数领域使用.每个类型的类的构造函数允许的,而且不能使用可变参数(可变参数)致电,类构造函数永远不会从白介素。类型称为是有阶级性的构造,执行此构造类型后加载型自动。
然而,一类的构造函数,像任何其他的静态方法,可称为.了这样的呼吁的结果,该类型的全球字段重置为它们...

全部展开

(1。)
类构造函数,或类型初始,该方法是特定于整个类型的类型后运行前加载该类型的任何一个.静态构造函数领域使用.每个类型的类的构造函数允许的,而且不能使用可变参数(可变参数)致电,类构造函数永远不会从白介素。类型称为是有阶级性的构造,执行此构造类型后加载型自动。
然而,一类的构造函数,像任何其他的静态方法,可称为.了这样的呼吁的结果,该类型的全球字段重置为它们的初始值。
调用类的构造明确不会导致类型子弹。
(2。)
我们现在继续我们的研究对象的解释和示范继承多态性与面向对象编程,使我们能够“计划一般”而不是“在特定的。”特别是,多态性使我们能够编写应用程序的进程对象共享在一个类层次结构相同的基类,好像是基类的所有对象。
(3。)
当创建宣布完全不是一类的新成员,您可以指定新的类应该继承现有.现有的类称为基类的成员,新的类是派生.派生类可以成为未来派生类的基类。
派生类,通常添加自己的领域methods.Therefore,派生类的更具体的比基类,代表了objects.Typically派生类的展品更专业组的基类和其他行为的行为所特有的派生类。
(4。)
随着多态性,我们可以设计和implememt系统,很容易extensiblenew类可以添加很少或根本没有修改应用程序的一般部分,只要新的类的继承层次,应用程序进程的一部分,只有generically.The一个必须改变,以适应新的类申请的部分是那些需要的新类的直接产品知识,程序员增加了层次结构。
(5。)
属性允许客户端访问类的状态好像他们是直接访问成员字段,而实际执行,通过一类方法访问。
这是ideal.The客户要直接访问对象的状态,不希望同methods.The类设计器,但是,想掩盖他在类成员的类的内部状态,并提供间接获得通过方法。

收起

1.)
类建设者或者类型初程序,是方法具体对整体上跑的类型,在类型被装载之后,并且,在其中任一类型的memnbers访问之前。类建设者为静态领域初始化使用。仅每个类型一个类建设者被允许,并且它不可能使用告诉的vararg (易变的论据)大会。通常,类建设者从IL代码从未叫。如果类型有类建设者,这个建设者自动地被执行,在类型类型被装载之后。
然而,类建设者,象其他静态方法,可以明白地...

全部展开

1.)
类建设者或者类型初程序,是方法具体对整体上跑的类型,在类型被装载之后,并且,在其中任一类型的memnbers访问之前。类建设者为静态领域初始化使用。仅每个类型一个类建设者被允许,并且它不可能使用告诉的vararg (易变的论据)大会。通常,类建设者从IL代码从未叫。如果类型有类建设者,这个建设者自动地被执行,在类型类型被装载之后。
然而,类建设者,象其他静态方法,可以明白地叫。由于这样电话,类型的全球性领域被重新设置对他们的原始价值。
叫类建设者不明白地带领键入再装。
(2.)
我们通过解释和展示与继承阶层的多形性现在继续我们的面向对象的编程技术的研究。多形性在一般使我们“编程”而不是“在具体的progtam。“特别是,多形性使我们写处理对象分享在类阶层的同一基类的应用,好象他们基类的所有对象。
(3.)
当创造类,而不是宣称全新的成员时,您能选定新的类应该继承现有的类的成员。现有的类称基类,并且新的类是派生类。每个派生类可能成为未来派生类的基类。
一个派生类通常增加它自己的领域和方法。所以,一个派生类比基类并且代表一个专业小组对象具体。典型地派生类显示是具体的对派生类它的基类的行为和另外的行为。
(4.)
多形性,我们可以设计,并且容易地是extensiblenew类的implememt系统可以增加用很少或不对应用的一般部分的修改,只要新的类一般地是那继承的阶层的一部分应用过程。必须修改容纳新的类应用的唯一的部分是要求新的类直接konwledge程序员增加到阶层的那些。
(5.)
物产允许客户访问类状态,好象他们直接地访问成员领域,当实际上实施那通入通过类方法时。
这是理想的。客户想要直接存取对对象的状态,并且不想要与方法一起使用。类设计师,然而,想要在类成员掩藏他的类内部状态,并且通过方法提供间接入口。

收起