讨人喜欢 发表于 2025-3-26 22:36:31
http://reply.papertrans.cn/47/4613/461218/461218_31.pngobeisance 发表于 2025-3-27 01:46:50
Structs,Structs are programmer-defined data types, very similar to classes. They have data members and function members. Although structs are similar to classes, there are a number of important differences. The most important ones are the following:转向 发表于 2025-3-27 06:45:13
Enumerations,An enumeration, or enum, is a programmer-defined type, such as a class or a struct.Awning 发表于 2025-3-27 11:51:59
Arrays,An array is a set of uniform data elements represented by a single variable name. The individual elements are accessed using the variable name together with one or more indexes between square brackets, as shown here:集合 发表于 2025-3-27 17:36:30
Delegates,You can think of a delegate as an object that holds one or more methods. Normally, of course, you wouldn’t think of “executing” an ., but a delegate is different from a typical object. You can execute a delegate, and when you do so, it executes the method or methods that it “holds.”寻找 发表于 2025-3-27 19:11:39
Events,One common requirement in many programs is that when a particular program event occurs, other parts of the program need to be notified that the event has occurred.Inscrutable 发表于 2025-3-27 23:08:03
http://reply.papertrans.cn/47/4613/461218/461218_37.pngLVAD360 发表于 2025-3-28 02:06:50
Conversions,To get an understanding of what conversions are, let’s start by considering the simple case in which you declare two variables of different types and then assign the value of one (the .) to the other (the .). Before the assignment can occur, the source value must be converted to a value of the target type. Figure 16-1 illustrates type conversion.儿童 发表于 2025-3-28 09:36:54
http://reply.papertrans.cn/47/4613/461218/461218_39.png胎儿 发表于 2025-3-28 14:10:38
Enumerators and Iterators,In Chapter 12, you saw that you can use a f oreach statement to cycle through the elements of an array. In this chapter, you’ll take a closer look at arrays and see why they can be processed by f oreach statements. You’ll also look at how you can add this capability to your own user-defined classes, using iterators.