文档库 最新最全的文档下载
当前位置:文档库 › 《C#高级编程》中英文对照_类

《C#高级编程》中英文对照_类

《C#高级编程》中英文对照_类
《C#高级编程》中英文对照_类

Object and Types

对象和类型

WHAT'S IN THIS CHAPTER?本章内容:

The differences between classes and structs 类和结构的区别

Class members 类成员

Passing values by value and by reference 按值和按引用传送参数

Method overloading 方法重载

Constructors and static constructors 构造函数和静态构造函数

Read-only fields 只读字段

Partial classes 部分类

Static classes 静态类

The object class, from which all other types and derived Object类,其他类型都从该类派生而来

So far, you've been introduced to some of the building blocks of the C# language, including variables,data types, and program flow statements, and you have seen a few very short complete programs containing little more than the Main() method. What you haven't really seen yet is how to put all these together to form a longer, complete program. The key to this lies in working with classes ----- the subject of this chapter.

Note that we cover inheritance and features related to inheritance in Chapter 4, "Inheritance."

到目前为止,我们介绍了组成C#语言的主要模块,包括变量、数据类型和程序流语句,并简要介绍了一个只包含Main()方法的完整小例子。但还没有介绍如何把这些内容组合在一起,构成一个完整的程序,其关键就在于对类的处理。这就是本章的主题。第4章将介绍继承以及与继承相关的特性。

This chapter introduces the basic syntax associated with classes. However, we assume that you are already famillar with the underlying principles of using classes ----for example, that you know what a constructor or a property is . This chapter is largely confined to applying those principles in C# code.

本章将讨论与类相关的基本语法,但假定你已经熟悉了使用类的基本原则,例如,知道构造函数或属性的含义,因此本章主要阐述如何把这些原则应用于C#代码

CLASSES AND STRUCTS 类和结构

Classes and structs are essentially templates from which you can create objects. Each object contains data and has methods to manipulate and access that data. The class defines that data and functionality each particular object (called an instance) of that class can contain. For example, if you have a class that represents a customer, it might define fields such as CustomerID, FirstName, LastName, and Address, which you will use to hold information about a particular customer. It might also define functionality that acts upon the data stored in these fields. You can then instantiate an object of this class to represent one specific customer, set the field values that instance, and use its functionality.

类和结构实际上都是创建对象的模板,每个对象都包含数据,并提供了处理和访问数据的方法。类定义了类的每个对象(称为实例)可以包含什么数据和功能。例如,如果一个类表示一个顾客,就可以定义字段CustomerID、FirstName、LastName和Address,以包含该顾客的信息。还可以定义处理在这些字段中存储的数据功能。接着,就可以实例化表示某个顾客的类的对象,为这个实例设置相关字段的值,并使用其功能。

Class PhoneCustomer

{

public const string DayOf SendingBill = "Monday";

public int CustomerID;

public string FirstName;

Public string LastName;

}

Structs differ from classes in the way that they are stored in memory and accessed (classes are reference types stored in the heap; structs are value types stored on the stack), and in some of their features (for example, structs don't support inheritance). You will tend to use structs for smaller data types for performance reasons. In terms of syntax, however, structs look very similar to classes; the main difference is that you use the keyword struct instead of class to declare them. For example, if you wanted all PhoneCustomer instances to be allocated on the stack instead of the managed heap, you could write:

结构与类的是它们在内存的存储方式、访问方式(类是存储在堆(heap)上的引用类型,而结构是存储在栈(stack)上的值类型)和它们的一些特征(如结构不支持继承)。较小的数据类型使用结构可提高性能。但在语法上,结构与类非常相似,主要的区别是使用关键字struct代替class来声明结构。例如,如果希望所有的PhoneCustomer实例都分布上栈上,而不是分布在托管堆上,就可以编写下面的语句:

Struct PhoneCustomerStruct

{

Public const string DayOfSendingBill = "Monday";

Public int CustomerID;

Public string FirstName;

Public string LastName;

}

For both classes and structs, you use the keywork new to declare an instance. This keyword creates the object and initializes it; in the following example, the default behavior is to zero out its fields:

对于类和结构,都使用关键字new来声明实例:这个关键字创建对象并对其进行初始化。在下面的例子中,类和结构的字段值都默认为0:

PhoneCustomer myCustomer = new PhoneCustomer(); //works for a class

PhoneCustomerStuct myCustomer2 = new PhoneCustomerStruct(); //works for a struct

In most cases, you'll use classes much more often than structs. Therefore, we discuss classes first and then the differences between classes and structs and the specific reasons why you might choose to use a struct instead of a class. Unless otherwise stated, however, you can assume that code presented for a class will work equally well for a struct.

在大多数情况下,类要比结构常用得多。因此,我们先讨论类,然后指出类和结构的区别,以及选择使用结构而不使用类的特殊原因。但除非特别说明,否则就可以假定用于类的代码也适用于结构。

CLASSES类

The data and functions within a class are known as the class's members. Microsoft's official terminology distinguishes between data members and function members. In addition to these members, classes can contain nested types (such as other classes). Accessibility to the members can be public, protected, internal protected, private, or internal. These are described in detail in Chapter 5, "Generic."

类中的数据和函数称为类的成员。Microsoft的正式术语对数据成员和函数成员进行了区分。除了这些成员外,类还可以包含的类型(如其他类)。成员的可访问性是public、protected、internal protected、private或internal。第5章将详细解释各种可访问性。

Data Members 数据成员

Data members are those members that contain the data for the class ----fields, constants, and events. Data members can be static. A class member is always an instance member unless it is explicitly declared as static.

数据成员是包含类的数据——字段、常量和事件的成员。数据成员可以是静态数据。类成员总是实例成员,除非用static进行显式的声明

Fields are any variables associated with the class. You have already seen fields in use in the PhoneCustomer class in the previous example.

字段是与类相关的变量。前面的例子已经使用了PhoneCustomer类中的字段。

After you have instantiated a PhoneCustomer object, you can then access these fields using the object.

FieldName syntax, as shown in this example:

一旦实例化PhoneCustomer对象,就可以使用语法ObjectFieldName来访问这些字段,如下便所示:

PhoneCustomer Customer1 = new PhoneCustomer();

Customer1.FirstName ="Simon";

Constants can be associated with classes in the same way as variables. You declare a constant using the const keyword. If it is declared as public , then it will in will be accessible from outside the class.

常量与类的关联方式同变量与类的关联方式。使用const关键字来声明常量。如果把它声明为public,就可以在类的外部访问它。

Class PhoneCustomer

{

Public const string DayOfSendingBill ="Monday";

Public int CustomerID;

Public string FirstName;

Public string LastName;

}

Events are class members that allow an object to notify a caller whenever something noteworthy happens, such as a field or property of the class changing, or some

form of user interaction occurring. The client can have code, known as an event handler, which reacts to the event. Chapter 8, "Delegates, Lambdas, and Events,"looks at events in detail.

事件是类是成员,在发生某些行为(如改变类的字段或属性,或者进行了某种形式的用户交互操作)时,它可以让对象通知调用方。客户可以包含所谓“事件处理程序”的代码来响应该事件。第8章将详细介绍事件。

Function Members 函数成员

Function members are those members that provide some functionality for manipulating the data in the class. They include methods, properties, constructor, finalizers, operators, and indexers.

函数成员提供了操作类中数据某些功能,包括方法、属性、构造函数和终结器(finalizer)、运算符以及索引器。

Methods are functions that are associated with a particular class. Just as with data members, function members are instance members by default. They can be made static by using the static modifier.

方法是与某个类相关的函数,与数据成员一样,函数成员默认为实例成员,使用static修饰符可以把方法定义为静态方法。

Properties are sets of functions that can be accessed from the client in a similar way to the public fileds of the class. C# provides a specific syntax for implementing read and write properties on your classes, so you don't have use method names that have the words Get or Set embedded in them.

Because there's a dedicated syntax for properties that is distinct from that for normal functions, the illusion of objects as actual things is strengthened for client code.

属性是可以信客户端访问的函数组,其访问方式与访问类的公共字段类似。C#为读写类中的属性提供了专用语法,所以不必使用那些名称中嵌有Get 或Set的方法。因为属性的这种语法不同于一般函数的语法,在客户端代码中,虚拟的对象被当做实际的东西。

Constructors are special functions that are call automatically when an object is instantiated.They must have the same name as the class to which they belong and cannot have a return type. Constructors are useful for initialization.

构造函数是在实例化对象时自动调用的特殊函数。它们必须与所属的类同名,且不能有返回类型。构造函数用于初始化字段的值。

Finalizers are similar to constructors but are called when the CLR detects that an object is no longer needed. They have the same name as the class, preceded by

a tilde (~). It is impossible to predict precisely when a finalizer will be called. Finalizers are discussed in Chapter 13, "Memory Management and Pointers."

终结器类似于构造函数,但是在CLR检测到不同需要某个对象时调用它。它们的名称与类相同,但前面有一个“~”符号。不可能预测什么时候调用终结器。第13章将介绍终结器。

Operators, at their simplest, are actions such as + or -. When you add two integers, you are, strictly speaking, using the + operator for integers. However, C# also

allows you to specify how existing operators will work with your own classes (operator overloading). Chapter 7, "Operators and Casts."

运算符执行的最简单的操作就是加法和减法。在两个整数相加时,严格地说,就是对整数使用“+”运算符。C#还允许指定把已有的运算符应用于自己的类(运算符重载)。第7章将详细论述运算符。

Indexers allow your objects to be indexed in the same way as an array or collection.

索引器允许对象以数组或集合的方式进行索引。

Methods 方法

Note that official C# terminology makes a distinction between functions and methods. In C# terminology, the term "function member" includes not only methods, but also other nondata members of a class or struct. This includes indexers, operators, constructors, destructors, and also ----perhaps somewhat surprisingly ---- properties. These are contrasted with data members: fields, constants, and events.

注意,正式的C#术语区分函数和方法。在C#术语中,“函数成员”不仅包含方法,而且也包含类或结构的一些非数据成员,如索引器、运算符、构造函数和析构函数等,甚至还有属性。这些都不是数据成员,字段、常量和事件都是数据成员。

Declaring Methods 方法的声明

In C#, the definition of a method consists of any method modifiers (such as the method's accessibility), the type of the return value, followed by the name of the method, followed by a list of input arguments enclosed in parentheses, followed by the body of the method enclosed in curly braces:

在C#中,方法的定义包括做生意方法修饰符(如方法的可访问性)、返回值的类型,然后依次是方法名和输入参数的列表(用圆括号括起来)和方法体(用花括号括起来)。

[modifiers] return_type MethodName([parameters])

{

//Method body

}

Each parameter consists of the name of the type of the parameter, and the name by which it can be referenced in the body of the method. Also, if the method returns a value, a return statement must be used with the return value to indicate each exit point. For example:

这个参数都包括参数的类型名和在方法体中的引用名称。但如果方法有返回值,returng语句就必须与返回值一起使用,以指定出口点,例如:Public bool IsSquare (Rectangle rect)

{

Return (rect.Height == rect.Width);

}

This code uses one of the .NET base classes, System.Drawing.Rectangle, which represents a rectangle. If the method doesn't return anything, you specify a return type of void because you can't omit the return type altogether, and if it takes no arguments, you still need to include an empty set of parentheses a after the method name. In this case, includeing a return statement is optional --- the method returns automatically when the closeing curly brace is reached. You should note that a method can contain as many return statements as required:

这段代码使用了一个表示矩形的.NET基类System.Drawing.Rectangle。如果方法没有返回值,就把返回类型指定为void,因为不能省略返回类型。如果方法不带参数,仍需要在方法名的后面包含一对空的圆括号()。此时return语句就是可选的——当到达右花括号时,方法会自动返回。注意方法可以包括任意多条return语句:

Public bool IsPositive (int value)

{

If (value < 0 )

Return false;

Return true;

}

Invoking Methods 调用方法

The following example, MathTest, illustrates the syntax for definition and instantiation of classes, and definition and invocation of methods. Besides the class that contains the Main() method, it defines a class named MathTest, which contains a couple of methods and a field.

在下面的例子中,MathTest说明了类的定义和实例化、方法的定义和调用的语法。除了包含Main()方法的类之外,它还定义了类MathTest,该类包含两个方法和一个字段。

Using System;

Namespace Wrox

{

Class MainEntryPoint

{

//Try calling some static functions.

Console.WriteLine("Pi is " + MathTest.GetPi());

Int x = MathTest.GetSquareOf(5);

Console.WriteLine("Square of 5 is " + x);

//Instantiate at MathTest object

MathTest math = new MathTest(); //this is C#'s way of instantiating a reference type

//Call nonstatic methods

Math.value = 30;

Console.WriteLine("Value field of math variable contains " + math.value);

Console.WriteLine("Square of 30 is " + math.GetSquare());

}

}

//Define a class named MathTest on which we will call a method

Class MathTest

{

Public int value;

Public int GetSquare()

{

Return value*value;

}

Public static int GetSquareOf(int x)

{

Return x*x;

}

Public static double GetPi()

{

Return 3.14159;

}

}

Running the MathTest example produces these results:

运行MathTest示例,会得到如下结果:

Pi is 3.14159

Square of 5 is 25

Value field of math variable contains 30

Square of 30 is 900

As you can see from the code, the MathTest class contains a field that contains a number, as well as a method to find the square of this number. It also contains two static methods, one to return the value of pi and one to find the square of the number passed in as a parameter.

Some features of this class are not really good examples of C# program design. For example, GetPi() would usually be implemented as a const field, but following good design here would mean using some concepts that we have not yet introduced.

从代码中可以看出,MathTest类包含一个字段和一个方法,该字段包含一个数字,该方法计算该数字的平方。这个类还包含两个静态方法,一个返回Pi 的值,另一个计算作为参数传入的数字的平方。

这个类有一些功能并不是设计C#程序的好例子。例如,GetPi()通常作为const字段来执行,而好的设计应使用目前还没有介绍的概念。

Passing Parameters to Methods 给方法传递参数

In general, parameters can be passed into methods by reference or by value. When a variable is passed by reference, the called method gets the actual variable --- so any changes made to the variable inside the method persist when the method exits. But, when a variable is passed by value, the called method gets an identical copy

of the variable ---- which means any changes made are lost when the method exits. For complex data types, passing by reference is more efficient because of the large amount of data must be copied when passing by value.

参数可以通过引用或通过值传递给方法。在变量通过引用传递给方法时,被调用的方法得到的就是这个变量,所以在方法内部对变量进行的任何改变在方法退出后仍旧有效。而如果变量通过值传送给方法,被调用的方法得到的是变量的一个相同副本,也就是说,在方法退出后,对变量进行的修改会丢失。对于复杂的数据类型,按引用传递的效率更高,因为在按值传递时,必须复制大量的数据。

In C#, all parameters are passed by value unless you specifically say otherwise. However, you need to be careful in understanding the implications of this for reference types. Because reference type variables hold only a reference to an object, it is this reference that will be copied, not the object itself. Hence, changes made to the underlying object will persist. Value type variables, in contrast, hold the actual data, so a copy of the data itself will be passed into the method. An int do not change the value of the original int object. Conversely, if an array or any other reference type, such as a class, is passed into a method, and the method uses the reference to change a value in that array, the new value is reflected in the original array object.

Here is an example, ParameterTest.cs, which demonstrates the following:

在C#中,除非特别说明,所有的参数都通过值来传递。但是,在理解引用类型的含义时需要注意。因为引用类型的变量只包含对象的引用,将要复制的正是这个引用,而不是对象本身,所以对底层对象的修改会保留下来。相反,值类型的对象包含的是实际数据,所以传递给方法的是数据本身的副本。例如,int通过值传递给方法,对应方法对该int的值所做的任何改变都没有改变原int对象的值。但如果把数组或其他引用类型(如类)传递给方法,对应的方法就会使用该引用改变这个数组中的值,而新值会反射在原始数组对象上。

下面的例子ParameterTest.cs说明了这一点:

Using System;

Namespace Wrox

{

Class parameterTest

{

Static void SomeFunction(int[] ints, int i)

{

ints [0] = 100;

i = 100;

}

Public static int Main()

{

Int i = 0;

Int[] ints = {0,1,2,3,4,8};

//Display the original values.

Console.WriteLine("i = " + i);

Console.WriteLine("ints[0] = " + ints[0]);

Console.WriteLine("Calling SomeFunction.");

//After this method returns, ints will be changed,but i will not.

SomeFunction(ints, i);

Console.WriteLine("i =" + i);

Console.WriteLine("ints[0] = " + ints[0] );

Return 0;

}

}

}

The output of this is: 结果如下:

parameterTest.exe

i = 0

Ints[0] = 0

Calling SomeFunction...

i = 0

Ints[0] = 100

Notice how the value of i remains unchanged, but the value changed in ints is also changed in the original array.

注意,i的值保持不变,而在ints中改变的值在原始数组中也改变了。

The behavior of strings is different again. This is because strings are immutable (if you alter a string's value, you create an entirely new string), so strings don't display the typical reference-type behavior. Any changes made to a string within a method call won't affect the original string. This point is discussed in more detail in Chapter 9, "strings and Regular Expressions."

注意字符串的行为方式有所不同,因为字符串是不可变的(如果改变字符串的值,就会创建一个全新的字符串),所以字符串无法采用一般引用类型的行为方式。在方法调用中,对字符串所做的任何改变都不会影响原始字符串。这一点将在第9章详细讨论。

Ref Parameters ref参数

As mentioned, passing variables by value is the default, but you can force value parameters to be passed by reference. To do so, use the ref keyword. If a parameter is passed to a method, and if the input argument for that method is prefixed with the ref keyword, any changes that the method makes to the variable will affect the value of the original object:

如前所述,通过值传送变量是默认的,也可以迫使值参数通过引用传送给方法。为此,要使用ref关键字。如果把一个参数传递给方法,且这个方法的输入参数前带有ref关键字,则该方法对变量所做的任何改变都会影响原始对象的值:

Static void SomeFunction(int [] ints, ref int i)

{

Ints [0] = 100;

I = 100; //The change to i will persist after SomeFunction() exits.

}

You will also need to add the ref keyword when invoke the method:

在调用该方法时,还需要添加ref关键字:

SomeFunction(ints, ref i);

Finally, it is also important to understand that C# continues to apply initialization requirements to parameters passed to methods. Any variable must be initialized before it is passed into a method, whether it is passed in by value or by reference.

最后,C#仍要求对传递给方法的参数进行初始化,理解这一点也非常重要。在传递给方法之前,无论是按值传递,还是按引用传递,任何变量都必须初始化。

Out Parameters out参数

In C-style languages, it is common for functions to be able to output more than one value from a single routine. This is accomplished using output parameters, by assigning the output values to variables that have been passed to the method by reference. Often, the starting values of the variables that are passed by reference are unimportant. Those values will be overwritten by the function, which may never even look at any previous value.

在C风格的语言中,函数常常能从一个例和中输出多个值,这使用输出参数实现,只要把输出的值赋予通过引用传递给方法的变量即可。通常,变量通过引用传递的初值并不重要,这些值会被函数重写,函数甚至从来没有使用过它们。

It would be convenient if you could use the same convention in C#. However,C# requires that variables be initialized with a starting value before they are referenced.Although you could initialize your input variables with meaningless values before passing them into a function that will fill them with real,meaningful ones, this practice seems at best needless and at worst confusing. However, there is a way to short-circuit the C# compiler's insistence on initial values for input arguments.

如果可以在C#中使用这种约定,就会非常方便。但C#要求变量在被引用前必须用一个值进行初始化。尽管在把输入变量传递给函数前,可以用没有意义的值初始化它们,因为函数将使用真实、有意义的值初始化它们,但是这样做是没有必要的,有时甚至会引起混乱。但有一种方法能够简化C#编译器所坚持的输入参数的初始化。

Your do this with the out keyword. When a method's input argument is prefixed with out, that method can be passed a variable that has no been initialized. The variable is passed by reference, so any changes that the method makes to the variable will persist when control returns from the called method. Again, you also need to use the out keyword when you all the method as well as when you define it:

编译器使用关键字来初始化。在方法的输入参数前面加上out前缀时,传递给该方法的变量可以不初始化。该变量通过引用传递,所以在从被调用的方法中返回时,对应方法对该变量进行的任何改变都会保留下来。在调用该方法时,还需要使用out关键字,与在定义该方法时一样:Static void SomeFunction(out int i)

{

i = 100;

}

Public static int main()

{

Int i; //note how i is declared but not initialized.

SomeFunction(out i);

Console.WriteLine(i);

Return 0;

}

Named Arguments 命名参数

Typically, parameters need to be passed into a method in the same order that they are defined. Named arguments allow you to pass in parameters in any order.So for the following method:

参数一般需要按定义的顺序传送给方法。命名参数允许按做生意顺序传递。所以下面的方法:

String FullName(string firstName, string lastName)

{

Return firstName + " " + lastName;

}

The following method calls will return the same full name:

下面的方法调用会返回相同的全名:

FullName("John", "Doe");

FullName(lastName: "Doe", firstName: "John");

If the method has several parameters, you can mix positional and named arguments in the same call.

如果方法有几个参数,就可以在同一个调用中混合使用位置参数和命名参数。

Optional Arguments 可选参数

Parameters can also be optional.You must supply a default value for parameters that are optional.The optional parameter(s) must be the last ones defined as well. So the following method declaration would be incorrect:

参数也可以是可选的。必须为可选参数提供默认值。可选参数还必须是方法定义的最后一个参数。所以下面的方法声明是不正确的:V oid TestMethod(int optionalNumber = 10, int notOptionalNumber)

{

System.Console.Write(optionalNumber + notOptionalNumber);

}

For this method to work, the optionalNumber parameter would have to be defined last.

要使这个方法正常工作,就必须在最后定义optionalNumber参数。

Method Overloading 方法的重载

C# supports method overloading ---- several versions of the method that have different signatures (that is, the same name, but a different number of parameters and/or different parameter data types).To overload methods, you simply declare the methods with the same name but different numbers or types of parameters:

C#支持方法的重载——方法的几个版本有不同的签名(即,方法名相同,但参数的个数和/或类型不同)。为了重载方法,只需声明同名但参数个数或类型不同的方法即可:

Class ResultDisplayer

{

V oid DisplayResult(string result)

{

//implementation

}

V oid DisplayResult(int result)

{

//implementation

}

}

If optional parameters won't work for you, then you need to use method overloading to achieve the same effect:

如果不能使用可选参数,就可以使用方法重载来达到此目的:

Class MyClass

{

int DoSomething(int x) //want 2nd parameter with default value 10

{

DoSomething(x,10);

}

Int DoSomething (int x, int y)

{

//implementation

}

}

As in any language, method overloading carries with it the potential for subtle runtime bugs if the wrong overload is called. Chapter 4 discusses how to code defensively against these problems. For now, you should know that C# does place some minimum restrictions on the parameters of overloaded methods:

在任何语言中,对于方法重载,如果调用了错误的重载方法,就有可能出现运行错误。第4章将讨论如何使代码避免这些错误。现在,知道C#在重载方法的参数方面有一些小限制即可:

It is not sufficient for two methods to differ only in their return type. 两个方法不能仅在返回类型上有区别。

It is not sufficient for two methods to differ only by virtue of a parameter having been declared as ref or out. 两个方法不能权根据参数是声明为ref还是out 来区分。

Properties 属性

The idea of a property is that it is a method or pair of methods that is dressed to look like a field. A good example of this is the Height property of a Windows Form.Suppose that you have the following code:

属性(property)的概念是:它是一个方法或一对方法,在客户端代码看来,它们是一个字段。例如Windows窗体的Height属性。假定有现在的代码://mainForm is of type Ssytem.Windows.Forms

mainForm.Height = 400;

On executing this code, the height of the window will be set to 400, and you will see the window resize on the screen. Syntactically, this code looks like you're setting a field, but in fact you are calling a property accessor that contains code resize the form.

执行这段代码时,窗口的高度设置为400,因此窗口会在屏幕上重新设置大小。在语法上,上面的代码类似于设置一个字段,但实际上是调用了属性访问

器,它包含的代码重新设置了窗体的大小。

To define a property in C#, you use the following syntax:

在C#中定义属性,可以使用下面的语法:

Public string SomeProperty

{

Get

{

Return "This is the property value.";

}

Set

{

//do whatever needs to be done to set the property.

}

}

The get accessor takes no parameters and must return the same type as the declared property. You should not specify any explicit parameters for the accessor either, but the compiler assumes it takes one parameter, which is of the same type again, and which is referred to as value. As an example, the following code contains a property called Age, which sets a field called age. In this example, age is referred to as the backing variable for the property Age.

get访问器不带任何参数,且必须返回属性声明的类型。也不应为set访问器指定任何显式参数,但编译器假定它带一个参数,其类型也与属性相同,并表示为value。例如,下面的代码一个属性Age,它设置了一个字段age。在这个例子中,age表示属性Age的后备变量。

Private int age;

Public int Age

{

Get

{

Return age;

}

Set

{

age= value;

}

}

Note the naming convention used here. You take advantage of C#'s case sensitivity by using the same name, Pascal-cased for the public property, and camel-cased for the equivalent private field if there is one. Some developers prefer to use field names that are prefixed by an underscore:_age;this provides an extremely convenient way of identifying fields.

注意这里所用的命名约定。我们采用C#的区分大小写模式,使用相同的名称,但公有属性采用Pascal大小写形式命名,并且如果存在一个等价的私有字段则它采用camel大小写形式命名。一些开发人员喜欢使用前缀为下划线的字段名,如_foreName,这会为识别字段提供极大的便利。

Read-Only and Write-Only Properties 只读和只写属性

It is possible to create a read-only property by simply omitting the set accessor from the property definition. Thus, to make Name a read-only property, you would do the following:

在属性定义中省略set访问器,就可以创建只读属性。因此,如下代码把Name变成只读属性:

Private string name;

Public string Name

{

Get

{

Return Name;

}

}

It is similarly possible to create a write-only property by omitting the get accessor. However, this is regarded as poor programming practice because it could be confusing to authors of client code. In general, it is recommended that if you are tempted to do this, you should use a method instead.

同样,在属性定义中省略get访问器,就可以创建只写属性。但是,这是不好的编程方式,因为这可能会使客户端代码的作者感到迷惑。一般情况下,如果要这么做,最好使用一个方法替代。

Access Modifiers for Properties 属性的访问修饰符

C# does allow the set and get accessors to have differing access modifiers. This would allow a property to have a public get and a private or protected set. This can help control how or then a property can be set. In the following code example, notice that the set has a private access modifier and the get does not have any. In this case, the get takes on the access level of the property. One of the accessors must follow the access level of the property. A compile error will be generated if the get accessor has the protected access from the property.

C#允许给属性的get和set访问器设置不同的访问修饰符,所以属性可以有公有的get访问器和私有或受保护的set访问器。这有助于控制属性的设置方式或时间。在下面的代码示例中,注意set访问器有一个私有访问修饰符,而get访问器没有任何访问修饰符。这表示get访问器具有属性的访问级别。在get和set访问器中,必须有一个具备属性的访问级别。如果get访问器的访问级别是protected,就会产生一个编译错误,因为这会使两个访问器的访问级别都不是属性。

Public string Name

{

Get

{

Return _name;

}

Private set

{

_name = value;

}

}

Auto-Implemented Properties 自动实现的属性(自动属性)

If there isn't going to be any logic in the properties set and get, then auto-implemented properties can be used. Auto-implemented properties implement the backing member variable automatically. The code for the earlier Age example would look like this:

如果属性的set和get访问器中没有任何逻辑,就可以使用自动实现的属性。这种属性会自动实现后备成员变量。前面Age示例的代码如下:Public string Age { get; set; }

The declaration private int age; is not needed. The compiler will create this automatically.

不需要声明private int age。编译器会自动创建它。

By using auto-implemented properties, validation of the property cannot be done at the property set. So in the previous example we could not have checked to see if an invalid age is set. Also, both accessors must be present. So an attempt to make a property read-only would cause an error:

使用自动实现的属性,就不能在属性设置中验证属性的有效性。所以在上面的例子中,不能检查是否设置了无效的年龄。但必须有两个访问器。尝试把该属性为只读属性,就会出错:

Public string Age { get; }

However, the access level of each accessor can be different. So the following is acceptable:

但是,每个访问器的访问级别可以不同。因此,下面的代码是合法的:

Public string Age { get; private set; }

A NOTE ABOUT INLINING 内联

Some developers may worry that the previous sections have presented a number of situations in which standard C# coding practices have led to very small functions ----- for example, accessing a field via a property instead of directly. Is this going to hurt performance becuase of the overhead of the extra function call? The answer is that there is no need to worry about performance loss from these kinds of programming methodlogies in C#. Recall that C# code is compiled to IL, then JIT compiled at runtime to native executable code. The JIT compiler is designed to generate highly optimized code and will ruthlessly inline code as appropriate (in other words, it replaces function calls with inline code). A method or property whose implementation simply calls another method or returns a field will almost certainly be inlined. Note, however, that the decision of where to inline is made entirely by the CLR. There is no way for you to control which methods are inlined by using, for example, some keyword similar to the inline keyword of C++.

一些开发人员可能会担心,在上一节中,我们列举了许多情况,其中标准C#编码方式导致了大材小用,例如,通过属性访问字段,而不是直接访问字段。这些额外的函数调用是否会增加系统开销,导致性能下降?其实,不需要担心这种编程方式会在C#中带来性能损失。C#代码会编译为IL,然后在运行时JIT编译为本地可执行代码。JIT编译器可生成高度优化的代码,并在适当的时候随意地内联代码(即,用内联代码来替代函数调用)。如果实现某个方法或属性仅是调用另一个方法,或返回一个字段,则该方法或属性肯定是内联的。但要注意,在何处内联代码完全由CLR决定。我们无法使用像C++中inline这样的关键字来控制哪些方法是内联的。

Constructors 构造函数

They syntax for declaring basic constructors is a method that has the same name as the containing class and that does not have any return type:

不良品项目定义中英文对照版

521不良項目定義

度較長的線狀痕跡 S02毛刺:產品沖裁后留在零件剪切邊的批鋒 S03模痕:模具在成形零件過程中造成的均勻類似刮痕現象 S04壓傷:由于模具表面有異物,使產品在沖壓成形過程中受壓力作用在表 面留下塊狀的下凹的現象 S05 切邊不齊:產品沖裁后零件剪切邊呈現出不整齊的現象 S06晃動:由于產品平面度超出spec,而呈現出凹凸不平的現象 507尺寸超差:產品的尺寸超出Spec 508材料外觀不良:原材料本身就具有的一些如白斑,黑點, 麻點,發黑,白灰,刮傷, 氧化等方面的不良 S09抽牙不良:抽牙尺寸超出Spec,或是出現抽牙抽歪,抽牙抽裂的現象 S10 攻牙不良:攻牙孔攻歪,通規不通,止規不止,或是出現實配螺絲打不進, 實配螺絲滑牙的現象 S11鉚合不良:鐵件鉚合后,鐵件與鐵件間間隙超Spec或鉚合孔偏位,鉚合不牢固 之現象 512凸包/拱橋沖裂:受模具,沖床壓力,或材料硬度的影響,產品在成形 過程中凸包/拱橋表面產生明顯的裂紋,或完全開裂的現象 513少工程:產品成形的工程數少于作業文件所規定的工程數的現象 514變形:由于受外力作用,產品失去其本身所應具有的形狀的現象 515生鏽:基體材料表面或切邊呈現經色,發生化學氧化的現象 516不潔:產品表面附著除油污,毛刺以外的其它異物 517油污:粘附於零件表面能擦除的呈塊狀或膜狀的油脂或變色異物 518碰刮傷:受尖銳硬物刮踫而在零件表面留下的,長度相對於寬度和深度 較長的表面斑痕 519包裝不良:產品的包裝方式未完全按照相應的作業文件來執行,可能會 造成品質隱患的現象 520混料:兩種或兩種以上的產品同時放置在某單一產品所存放的區域 521點焊不良:產品點焊后鐵件與鐵件間連接不牢固,拉力測試超Spec. 存在點焊點錯位,漏焊,虛焊, 燒穿, 焊渣等缺陷的現象522字模不清/殘缺/錯誤:Mark 字體不完整,模糊不清,字模的位置,式樣 等未完全按作業文件要求作業的現象 5.2.2 涂裝不良項目定義 P01雜質:由于烤漆面粘附有雜質,烤漆后在表面形成一種凸起的可剝落的塊 狀或點狀漆的現象 P02刮傷/掉漆:烤漆表面在外力(碰撞,擦刮)作用下,漆層呈點狀,塊

五金工具英语词汇

五金工具英语词汇toolbox 工具箱 bench 工作台 vice, clamp 虎钳(美作:vise) saw 锯 bow saw 弓锯 circular saw 圆锯(美作:buzzsaw)compass saw, scroll saw 钢丝锯 fretsaw 细锯 handsaw 手锯 chisel 口凿 cold chisel, burin 冰凿 gouge, firmer gouge 半圆凿 plane 刨子 moulding plane 型刨 jack plane 粗刨 rabbet plane 槽刨 drawknife 刮刀 scraper 三角刮刀 rasp 粗锉 file 锉 square 尺

miter 斜槽规 scriber 近线尺 set square, triangle 三角板brace 手拉曲柄锉 hand drill 手钻 drill, bit 钻,有柄钻 gimlet, auger 钻,无柄钻countersink 锥口钻 gauge, marking gauge 量规hammer 锤 mallet 木槌 nail 钉 brad 平头钉 tack, stud 圆头钉 screw 螺丝钉 screwdriver 螺丝刀,改锥screw tap 螺丝攻 nail puller 拔钉器 ruler 尺 tape measure 卷尺 folding ruler 折尺sandpaper, emery paper 砂纸

toolbox 工具箱 bench 工作台 vice, clamp 虎钳(美作:vise) saw 锯 bow saw 弓锯 circular saw 圆锯(美作:buzzsaw)compass saw, scroll saw 钢丝锯fretsaw 细锯 handsaw 手锯 chisel 口凿 cold chisel, burin 冰凿 gouge, firmer gouge 半圆凿 plane 刨子 moulding plane 型刨 jack plane 粗刨 rabbet plane 槽刨 drawknife 刮刀 scraper 三角刮刀 rasp 粗锉 file 锉 square 尺 miter 斜槽规

SMT焊接不良现象中英文对照表

[replyview]不良现象中英文对照表 1.缺件(MISSING PARTS) 28.脚未弯(PIN NOT BENT) 55.印章错误(WRONG STAMPS) 2.错件(WRONG PARTS) 29.缺盖章(MISSING STAMP) 56.尺寸错误 (DIMENSION WRONG) 3.多件(EXCESSIVE PARTS) 30.缺卷标(MISSING LABEL) 57.二极管坏 (DIODE NG) 4.短路(SHORT) 31.缺序号(MISSING S/N) 58.晶体管坏(TRANSISTOR NG) 5.断路(OPEN) 32.序号错(WRONG S/N) 59.振荡器坏(X’TL NG) 6.线短(WIRE SHORT) 33.卷标错(WRONG LABEL) 60.管装错误(TUBES WRONG) 7.线长(WIRE LONG) 34.标示错(WRONG MARK) 61.阻值错误(IMPEDANCE WRONG) 8.拐线(WIRE POOR DDRESS) 35.脚太短(PIN SHORT) 62.版本错误(REV WRONG) 9.冷焊(COLD SOLDER) 36.J1不洁(J1 DIRTY) 63.电测不良(TEST FAILURE) 10.包焊(EXCESS SOLDER) 37.锡凹陷(SOLDER SCOOPED) 64.版本未标(NON REV LEBEL) 11.空焊(MISSING SOLDER) 38.线序错(W/L OF WIRE) 65.包装损坏 (PACKING DAMAGED) 12.锡尖(SOLDER ICICLE) 39.未测试(NO TEST) 66.印章模糊(STAMPS DEFECTIVE) 13.锡渣(SOLDER SPLASH) 40.VR变形(VR DEFORMED) 67.卷标歪斜(LABEL TILT) 14.锡裂(SODER CRACK) 41.PCB翘皮(PCB PEELING) 68.外箱损坏(CARTON DAMAGED) 15.锡洞(PIN HOLE) 42.PCB弯曲(PCB TWIST) 69.点胶不良(POOR GLUE) 16.锡球(SOLDER BALL) 43.零件沾胶(GLUE ON PARTS) 70.IC座氧化 (SOCKET RUST)

中英文论文对照格式

英文论文APA格式 英文论文一些格式要求与国内期刊有所不同。从学术的角度讲,它更加严谨和科学,并且方便电子系统检索和存档。 版面格式

表格 表格的题目格式与正文相同,靠左边,位于表格的上部。题目前加Table后跟数字,表示此文的第几个表格。 表格主体居中,边框粗细采用0.5磅;表格内文字采用Times New Roman,10磅。 举例: Table 1. The capitals, assets and revenue in listed banks

图表和图片 图表和图片的题目格式与正文相同,位于图表和图片的下部。题目前加Figure 后跟数字,表示此文的第几个图表。图表及题目都居中。只允许使用黑白图片和表格。 举例: Figure 1. The Trend of Economic Development 注:Figure与Table都不要缩写。 引用格式与参考文献 1. 在论文中的引用采取插入作者、年份和页数方式,如"Doe (2001, p.10) reported that …" or "This在论文中的引用采取作者和年份插入方式,如"Doe (2001, p.10) reported that …" or "This problem has been studied previously (Smith, 1958, pp.20-25)。文中插入的引用应该与文末参考文献相对应。 举例:Frankly speaking, it is just a simulating one made by the government, or a fake competition, directly speaking. (Gao, 2003, p.220). 2. 在文末参考文献中,姓前名后,姓与名之间以逗号分隔;如有两个作者,以and连接;如有三个或三个以上作者,前面的作者以逗号分隔,最后一个作者以and连接。 3. 参考文献中各项目以“点”分隔,最后以“点”结束。 4. 文末参考文献请按照以下格式:

不良现象中英文对照表

良现象中英文对照表 不良现象中英文对照表 1.缺件(MISSING PARTS)…missing parts 2.错件(WRONG PARTS)…wrong parts 3.多件(EXCESSIVE PARTS)…excessive parts 4.短路(SHORT)…short 5.断路(OPEN)…open 6.线短(WIRE SHORT)…wire short 7.线长(WIRE LONG)…wire long 8.拐线(WIRE POOR DDRESS)…wire poor adress 9.冷焊(COLD SOLDER) …cold solder 10.包焊(EXCESS SOLDER)…excess solder 11.空焊(MISSING SOLDER)…missing solder 12.锡尖(SOLDER ICICLE)…icicle 13.锡渣(SOLDER SPLASH)…solder splash 14.锡裂(SODER CRACK)…solder crack 15.锡洞(PIN HOLE)..solder hole 16.锡球(SOLDER BALL)..sloder ball 17.锡桥(SOLDER BRIDGE)…solder bridge 18.滑牙(SCREW LOOSE)…screw loose 19.氧化(RUST) …rust 20.异物(FOREIGNER MATERIAL)…foreigner material 21.溢胶(EXCESSIVE GLUE) 22.锡短路(SOLDER BRIDGE) 23.锡不足(SOLDER INSUFFICIENT) 24.极性反(WRONG POLARITY) 25.脚未入(PIN UNSEATED) 26.脚未出(PIN UNVISIBLE) 27.脚未剪(PIN NO CUT) 28.脚未弯(PIN NOT BENT) 29.缺盖章(MISSING STAMP) 30.缺标签(MISSING LABEL)…missing label 31.缺序号(MISSING S/N) 32.序号错(WRONG S/N) 33.标签错(WRONG LABEL) 34.标示错(WRONG MARK) 35.脚太短(PIN SHORT) 36.J1不洁(J1 DIRTY) 37.锡凹陷(SOLDER SCOOPED) 38.线序错(W/L OF WIRE)

五金术语对照

Normteile标准件 Gewinde, Schrauben, Muttern螺纹、螺栓、螺母 Gewinde螺纹 Schrauben螺栓 Gewindeausl?ufe螺纹收尾、肩距 Gewindefreistiche螺纹退刀槽 Senkungen锪孔、沉孔 Mutter螺母 Scheibe档圈 Schlüsselweite扳手口尺寸 Werkzeugvierkante工具四方柄 Stifte, Bolzen, Niete, Mitnehmerverbindung Stifte 圆柱销 Kerbstifte弹性销 Bolzen轴销 Keile 键 Federn弹簧 Keilwellenverbindung花键连接 Blindniete抽芯铆钉 Werkzeugkegel刀具、工具锥度 Normteile für Vorrichtungen und Standzwerkzeuge工装夹具和冲裁模具的标准件 Normteile für Vorrichtungen工装夹具的标准件 T-NutenT型槽 Kugelscheiben球面垫圈 Normteile für Stanzwerkzeuge冲裁模具标准件 Federn弹簧 Antriebstechnik传动技术 RiementriebeV型带传动

Gleitlagerbuchsen滑动轴承轴瓦 W?lzlager滚动轴承 Nutmuttern圆螺母 Passscheiben配合垫圈 Stützscheiben调整垫圈 Wellenenden轴端 Wellendichtring轴用密封件 RunddichtringO型密封圈 机械工具 Mechanic“s Tools spanner 扳子 (美作:wrench) double-ended spanner 双头扳子 adjustable spanner, monkey wrench 活扳子,活络扳手box spanner 管钳子 (美作:socket wrench) calipers 卡规 pincers, tongs 夹钳 shears 剪子 wire cutters 剪线钳 multipurpose pliers, universal pliers 万能手钳

英语阅读(中英文对照)文章汇总

双语阅读文章汇总(一) 一、冰淇淋居然可以高温不化 Ice cream that doesn't melt! Japanese scientists create a recipe that includes a secret strawberry extract to keep the treat cool in warm weather 日本科学家发明了不会融化的冰激凌,还能在炎热的天气里保持凉爽的口感 Japanese scientists have come up with a cool solution to stop ice cream melting before you've had time to finish it. 近日,日本科学家们找到了防止冰激凌融化的好方法。 C (82.4 F) weather and still tas The ice cream retains its original shape in 28° tes 'cool',according to the report. 据报道,这种冰激凌在28度的温度中不仅不会融化,还能保持清凉的口感。 A strawberry extract stops the oil and water from separating so quickly whic h means the icecreams (pictured) stay frozen - even if you blow a hair dryer at them, reports suggest 报道称,冰淇淋不会融化是由于一种叫做草莓提取物的物质,它减缓了水油分离的速度,使得冰激凌即使是在吹风机的吹拂下依旧保持形状。 The company created the ice creams by accident. 这种冰激凌的产生完全是出于意外。 A pastry chef tried to use the strawberry extract to create a new kind of con fectionery in orderto use strawberries that were not the right shape to be sold . 甜点师本想用这种草莓提取物创造一种新型甜品,以试图把因品相不好而无法顺利出售的草 莓利用起来。 He realised the cream would solidify when put in contact with the strawberry extract. 他发现可以使用草莓提取物来减缓冰激凌融化的速度。

英语美文100篇·中英文对照,附带美图

谈一场恋爱就像读一本新书 Starting a new book is a risk, just like falling in love. You have to commit to it. You open the pages knowing a little bit about it maybe, from the back or from a blurb on the front. But who knows, right? Those bits and pieces aren’t always right. 读一本新书恰似坠入爱河,是场冒险。你得全身心投入进去。翻开书页之时,从序言简介直至封底你或许都知之甚少。但谁又不是呢?字里行间的只言片语亦不总是正确。 Sometimes people advertise themselves as one thing and then when you get deep into it you realize that they’re something completely different. Either there was some good marketing attached to a terrible book, or the story was only explained in a superficial way and once you reach the middle of the book, you realize there’s so much more to this book than anyone could have ever told you. 有时候你会发现,人们自我推销时是一种形象,等你再深入了解后,他们又完全是另一种模样了。有时拙作却配有出色的市场推销,故事的叙述却流于表面,阅读过半后,你方才发觉:这本书真是出乎意料地妙不可言,这种感受只要靠自己去感悟! You start off slow. The story is beginning to unfold. You’re unsure. It’s a big commitment lugging this tome around. Maybe this book won’t be that great but you’ll feel guilty about putting it down. Maybe it’ll be so awful you’ll keep hate-reading or just set it down immediately and never pick it up again. Or maybe you’ll come back to it some night, drunk or lonely — needing something to fill the time, but it won’t be any better than it was when you first started reading it. 你慢慢翻页,故事开始缓慢展开,而你却依旧心存犹疑。阅读这样的巨著需要百分之百的投入。或许它并不是你想象中的伟大的作品,奈何半途弃读会使你觉得不安。又或许,故事真的很烂,你要么咬牙苦读下去,要么立刻放弃束之高阁。抑或某个酒醉或孤寂的夜晚,你又重新捡起这本书来——但只为打发时光。不管怎样,它并没有比你初次阅读时好多少。

五金英文对照

冲压工具stamping tool 冲压法pressing 冲击impact 冲击强度impact strength 冲击测试impact test 冲锻法;锤锻法;模锻法drop forging 去毛边trimming 粗糙度roughness 光滑的smooth 法兰盖blind flange, blind 阀体body 阀盖bonnet 气缸(或液压缸)操纵的cylinder operated 碳素钢carbon steel (CS) 低碳钢low-carbon steel 中碳钢medium-carbon steel 高碳钢high-carbon steel 普通碳素钢general carbon steel 优质碳素钢high-quality carbon steel 普通低合金结构钢general structure low-alloy steel 合金结构钢structural alloy steel 合金钢alloy steel

低合金钢low alloy steel 中合金钢medium alloy steel 高合金钢high alloy steel 耐热钢heat resisting steel 高强度钢high strength steel 复合钢clad steel 工具钢tool steel 弹簧钢spring steel 钼钢molybdenum steel 镍钢nickel steel 铬钢chromium steel 铬钼钢chrome-molybdenum steel 铬镍钢chromium-nickel steel,chrome-nickel steel 不锈钢stainless steel (S.S.) 奥氏体不锈钢Austenitic stainless steel 马氏体不锈钢Martensitic stainless steel 司特来合金(钨铬钴台金) Stellite 耐蚀耐热镍基合金Hastelloy 铬镍铁合金inconel 耐热铬镍铁合金incoloy 20合金20 alloy 平炉钢(马丁钢) Martin steel

关于三八妇女节的英语作文(中英对照)

关于三八妇女节的英语作文(中英对照) Today is March 8, International Women's Day is to commemorate the world of working women to fight for peace and democracy, women's liberation struggle holiday. Since yesterday, I discussed with my father on how to make my mother happy over the holiday. I would first make a suggestion: "Give my mother to buy a new phone." Dad thought for a moment, said: "Mom bought a mobile phone soon, you can use, there is no need to change." Dad said: "We go out to buy some cosmetics, her mother there." I am opposed to:"Mom's cosmetics too much, many of which are not all useful." My Father and I are anxious, and in the end what got her point? We simply asked her what he wanted bar. But my mother said: "I do not want to buy, I just want to sleep." I do not know why my mother this way, but I know my mother is very hard to control more than 300 college students, daytime talk, meetings, writing papers, fill out information and give students lessons, etc. in the evening and students should check the study up the bedroom. If it is me, I would like the mother, in addition to want to sleep, the other wants to do nothing. However, I and Dad are determined to give my mother, "International Women's Day" gifts, things came back to buy her mother was shocked at my father bought a goggles and a pillow, my mother smiled. I wish Mom "Women's Day" Happy! 今天是三月八日,国际妇女节是为了纪念世界劳动妇女争取和平与民主,妇女解放斗争的节日。从昨天起,我跟我的父亲如何让妈妈快乐的节日。我首先提出一个建议:“给我妈妈买个新手机。”爸爸想了一会儿,说:“妈妈买了一部手机,很快,你能够使用,所以没有

不良现象中英文对照表

1.缺件(MISSING PARTS) 2.错件(WRONG PARTS) 3.多件(EXCESSIVE PARTS) 4.短路(SHORT) 5.断路(OPEN) 6.线短(WIRE SHORT) 7.线长(WIRE LONG) 8.拐线(WIRE POOR DDRESS) 9.冷焊(COLD SOLDER) 10.包焊(EXCESS SOLDER) 11.空焊(MISSING SOLDER) 12.锡尖(SOLDER ICICLE) 13.锡渣(SOLDER SPLASH) 14.锡裂(SODER CRACK) 15.锡洞(PIN HOLE) 16.锡球(SOLDER BALL) 17.锡桥(SOLDER BRIDGE) 18.滑牙(SCREW LOOSE) 19.氧化(RUST) 20.异物(FOREIGNER MATERIAL) 21.溢胶(EXCESSIVE GLUE) 22.锡短路(SOLDER BRIDGE) 23.锡不足(SOLDER INSUFFICIENT) 24.极性反(WRONG POLARITY)25.脚未入(PIN UNSEATED) 26.脚未出(PIN UNVISIBLE) 27.脚未剪(PIN NO CUT) 28.脚未弯(PIN NOT BENT) 29.缺盖章(MISSING STAMP) 30.缺标签(MISSING LABEL) 31.缺序号(MISSING S/N) 32.序号错(WRONG S/N) 33.标签错(WRONG LABEL) 34.标示错(WRONG MARK) 35.脚太短(PIN SHORT) 36.J1不洁(J1 DIRTY) 37.锡凹陷(SOLDER SCOOPED) 38.线序错(W/L OF WIRE) 39.未测试(NO TEST) 40.VR变形(VR DEFORMED 41.PCB翘皮(PCB PEELING) 42.PCB弯曲(PCB TWIST) 43.零件沾胶(GLUE ON PARTS) 44.零件脚长(PARTS PIN LONG) 45.浮件(PARTS LIFT) 46.零件歪斜(PARTS TILT) 47.零件相触(PARTS TOUCH) 48.零件变形(PARTS DEFORMED)

橱柜行业词汇中英文对照23452345234汇总(20200501065520)

厨柜英语Kitchen Cabinet English 地柜Base cabinet/Unit 吊柜Wall cabinet/Unit 高柜Tall cabinet/Unit 半高柜Semi-tall cabinet 其它miscellaneous 灯具light 水槽sink 电器appliances 水龙头Faucet 下水器bottle tap 封板filler panel 双层餐具2-tier cutlery tray 垃圾桶waste bin 垃圾篮cleaning material basket 层板粒supports 上翻门flap-up door 灯具变压器transformer for integrated light 转向灯变压器transformer for volatage halogen 拉篮pull-out basket 见光贴面finished side 吊轨mounting track 喷口pull-out spout 微波炉microwave 烤箱oven 油烟机chimney hood 燃气炉burner 电磁炉ceramic hob 结构: 屋顶roofing 墙面fasade 台面Counter top 直径Diameter 后面Rear 底部Base 平面Plan 立面Elevation 侧面Side Elevation 背面Back Elevation 平面图Floor Plan 正面图Front Elevation 立面图Sectional Elevation 折角Dog Ear 灯线Light/lamp kick 脚线Toe kick 脚线高度Toe height 配同门板色脚线concolor toe kick 柜子前边缘Carcase Front Edge 中间开Center separate 板材: 原木lumber 实木solid wood 橡木oak 桦木birch 橡胶木Rubber wood 贴橡木皮oak veneer 夹板,胶合板Plywood 爱家板MFC board 中纤板MDF Board 海木板Seawood board 防火板Fireproof board 防潮板Damp proof board 刨花板(PB) Particle board / Chipboard PVC吸塑PVC Membrane 平板flat sheet 波形板roofing sheet 门板Door Panel 顶板 /天板Top Panel/Board 面板Faceplate 前板Front Panel 侧板Side Panel 背板Back Panel / Rear Panel 底板Base Panel / Bottom Board 加高侧板The raised Box Side 名牌Name plate 层板Shelf Board 活板Movable Board 固定板Fix Board 补强板Support Board 直边板Wood end panel 支撑挂板Support Plate 裙角Bottom Front Board 桶侧Drawer Side Board 桶尾Drawer Back Board 桶里板Drawer Inner Board 抽屉面/桶面/桶头Drawer Front Panel 灯板lamp panel 见光Exposed panel 假门Fake Door Panel 假门板Fake panel

英语阅读中英文对照文章汇总

双语阅读文章汇总(一)一、冰淇淋居然可以高温不化Ice cream that doesn't melt! Japanese scientists create a recipe that includes a secret strawberry extract to keep the treat cool in warm weather 日本科学家发明了不会融化的冰激凌,还能在炎热的天气里保持凉爽的口感 Japanese scientists have come up with a cool solution to stop ice cream melting before you've had time to finish it. 近日,日本科学家们找到了防止冰激凌融化的好方法。 The ice cream retains its original shape in 28°C (82.4 F) weather and still tastes 'cool',according to the report. 据报道,这种冰激凌在28度的温度中不仅不会融化,还能保持清凉的口感。 A strawberry extract stops the oil and water from separating so quickly which means the icecreams (pictured) stay frozen - even if you blow a hair dryer at them, reports suggest 报道称,冰淇淋不会融化是由于一种叫做草莓提取物的物质,它减缓了水油分离的速度,使得冰 激凌即使是在吹风机的吹拂下依旧保持形状。 The company created the ice creams by accident. 这种冰激凌的产生完全是出于意外。 A pastry chef tried to use the strawberry extract to create a new kind of confectionery in orderto use strawberries that were not the right shape to be sold. 甜点师本想用这种草莓提取物创造一种新型甜品,以试图把因品相不好而无法顺利出售的草莓利用起来。 He realised the cream would solidify when put in contact with the strawberry extract. 他发现可以使用草莓提取物来减缓冰激凌融化的速度。 1 / 16 The ice creams (pictured), which are only for sale in parts of Japan, first hit stores in Kanazawain April before rolling out in Osaka and Tokyo 不目前,这种冰激凌已经在日本金泽当地开始销售,预计之后会把业务拓展到东京和大阪。过要是想在其他国家吃到这种冰激凌,恐怕还需要一段时间二、做个成年人有哪些好处No one can tell me what to do. 没人能对我指手画脚。Well, except mom. …除了我妈妈。嗯No one except my mom can tell me what to do. 除了我妈妈没人能对我指手画脚。And maybe, girlfriend. 可能我女朋友可以。No one except my mom and my girlfriend can tell me what to do. 除了我妈妈和女朋友没人能对我指手画脚。Well, my manager as well. …老板也可以。嗯No one except my mom, my girlfriend and my manager can tell me what to do. 除了我妈妈、女朋友和老板没人能对我指手画脚。Also, the bank. 还有银行。No one except my mom, my girlfriend, my manager and my bank can tell

不良描述中英文对照

不良描述中英文对照 Goods Supplement补货 1.Plastic parts 塑胶部件 Abrasion/划痕、 Bubbles/气泡、 Burrs/毛刺、 Bad Plating/电镀不良、 Contamination/杂质、 Crack/爆裂、 Combine Lines/结合线、 Deformation/变形、 Flow Marks/流痕、 GreasyDirt/油污、 Haze/雾状、 Jelly/泠胶、 Mold Marks/模痕、 Melange Color/混色、 Oppilation Hole/盲孔、 Pull White/拉白、 Pour Hole uneven/浇口不平、 Wrong Stamping/字麦不符、 Short Shots/缺料、 Shrinkage/缩水、 Stripped Screw/螺丝滑牙、 Top White/顶白、 Weld Lines/夹水纹、 Wrong Dimension/尺寸不符、 Wrong Texture/纹理错误、 Light/发亮, Gaps裂缝、 Steps 披峰、 表面有手指印Surface finger prints、 丝印错误Wrong printing、 丝印偏移Printing slanted、 丝印重影Printing double image、 丝印有污点,拖尾Printing smearing、 丝印不平坦(多油或少油)Printing uneven ( thin / thick )、丝印对于中心偏位Printing off centre、 压痕或凹痕Press mark 或dented mark、 反光或毛刺Flashing 或 burr、 镜片有针孔Pin hole on lens. 光泽luster/白点white dot、 黑点black dot、

五金相关词汇中英文对照剖析

五金相关词汇中英文对 照 Normteile 标准件 Gewinde, Schrauben, Muttern 螺纹、螺栓、螺母 Gewinde 螺纹 Schrauben 螺栓 Gewindeauslufe 螺纹收尾、肩距 Gewindefreistiche 螺纹退刀槽 Senkungen 锪孔、沉孔 Mutter 螺母 Scheibe 档圈 Schl tsselweite 扳手口尺寸 Werkzeugvierkante 工具四方柄 Stifte, Bolzen, Niete, Mitnehmerverbindung Stifte 圆柱销 Kerbstifte 弹性销 Bolzen 轴销 Keile 键 Federn 弹簧 Keilwellenverbindung 花键连接 Blindniete 抽芯铆钉 Werkzeugkegel 刀具、工具锥度 Normteile f r Vorrichtungen und Standzwerkzeuge 工装夹具

和冲裁模具的标准件 Normteile f r Vorrichtungen工装夹具的标准件 T-NutenT 型槽 Kugelscheiben 球面垫圈 Normteile f r Stanzwerkzeuge 冲裁模具标准件 Federn 弹簧 Antriebstechnik 传动技术 RiementriebeV 型带传动 Gleitlagerbuchsen 滑动轴承轴瓦 W?lzlager 滚动轴承 Nutmuttern 圆螺母 Passscheiben配合垫圈 St t tzscheiben 调整垫圈 Wellenenden 轴端 Wellendichtring 轴用密封件 RunddichtringO 型密封圈 机械工具Mechanic“s Toosl spanner 扳子(美 作:wrench) double-ended spanner 双头扳子adjustable

品质相关英文缩写和不良现象表述

CEM Contract Manufacture service 合约委托代工 IBSC Internet Business Solution Center 国际互联网应用中心 PCEG Personal Computer Enclosure group 个人计算机外设事业群(FOXTEQ) SABG system assembly business group 系统组装事业群 Engineer standard 工标 Document center (database center)资料中心 Design Center 设计中心 Painting 烤漆(厂) Assembly组装(厂) Stamping 冲压(厂) Education and Training教育训练 proposal improvement/creative suggestion提案改善 Technological exchange and study 技术交流研习会 Technology and Development Committee 技术发展委员会

BS Brain Storming 脑力激荡 QCC Quality Control Circle 品质圈PDCA Plan Do Check Actio n 计划执行检查总结DCC delivery control center 交货管制中心Computer 计算机类产品 Consumer electronics 消费性电子产品Communication 通讯类产品 Core value(核心价值) Love 爱心 Confidence 信心 Decision 决心 Corporate culture(公司文化) Integration 融合 Responsibility 责任 Progress 进步

不良中英文对照表

不良现象中英文对照表 1.缺件(missing parts) 2.错件(wrong parts) 3.多件(excessive parts) 4.短路(short) 5.断路(open) 6.线短(wire short) 7.线长(wire long) 8.拐线(wire poor ddress) 9.冷焊(cold solder) 10.包焊(excess solder) 11.空焊(missing solder) 12.锡尖(solder icicle) 13.锡渣(solder splash) 14.锡裂(soder crack) 15.锡洞(pin hole) 16.锡球(solder ball) 17.锡桥(solder bridge) 18.滑牙(screw loose) 19.氧化(rust) 20.异物(foreigner material) 21.溢胶(excessive glue) 22.锡短路(solder bridge) 23.锡不足(solder insufficient) 24.极性反(wrong polarity) 25.脚未入(pin unseated) 26.脚未出(pin unvisible) 27.脚未剪(pin no cut) 28.脚未弯(pin not bent) 29.缺盖章(missing stamp) 30.缺标签(missing label) 31.缺序号(missing s/n) 32.序号错(wrong s/n) 33.标签错(wrong label) 34.标示错(wrong mark) 35.脚太短(pin short) 36.j1不洁(j1 dirty) 37.锡凹陷(solder scooped) 38.线序错(w/l of wire) 39.未测试(no test) 40.vr变形(vr deformed) 43.零件沾胶(glue on parts) 41.pcb翘皮(pcb peeling) 42.pcb弯曲(pcb twist) 44.零件脚长(parts pin long) 45.浮件(parts lift) 46.零件歪斜(parts tilt) 47.零件相触(parts touch) 48.零件变形(parts deformed) 49.零件损坏(parts damaged) 50.零件脚脏(pin dirty) 51.零件多装(parts excess) 52.零件沾锡(solder on parts) 53.零件偏移(parts shift) 54.包装错误(wrong packing) 55.印章错误(wrong stamps) 56.尺寸错误(dimension wrong) 57.二极管坏(diode ng) 58.晶体管坏(transistor ng) 59.振荡器坏(x’tl ng) 60.管装错误(tubes wrong) 61.阻值错误(impedance wrong) 62.版本错误(rev wrong) 63.电测不良(test failure) 64.版本未标(non rev lebel) 65.包装损坏(packing damaged) 66.印章模糊(stamps defective) 67.标签歪斜(label tilt) 68.外箱损坏(carton damaged) 69.点胶不良(poor glue) 70.ic座氧化(socket rust) 71.缺ul标签(missing ul label) 72.线材不良(wire failure) 73.零件脚损坏(pin damaged) 74.金手指沾锡(solder on golden fingers) 75.包装文件错(racking doc wrong) 76.包装数量错(packing q’ty wrong) 77.零件未定位(parts unseated) 78.金手指沾胶(glue on golden fingers) 79.垫片安装不良(washer unseated) 80.线材安装不良(wire unseated) 81.立碑(tombstone)

相关文档
相关文档 最新文档