友情提示:如果本网页打开太慢或显示不完整,请尝试鼠标右键“刷新”本网页!
VB2008从入门到精通(PDF格式英文版)-第110部分
快捷操作: 按键盘上方向键 ← 或 → 可快速上下翻页 按键盘上的 Enter 键可回到本书目录页 按键盘上方向键 ↑ 可回到本页顶部! 如果本书没有阅读完,想下次继续接着阅读,可使用上方 "收藏到我的浏览器" 功能 和 "加入书签" 功能!
time to get used to coding with them。
o Overloading operators makes sense when you need to define custom types and you
want them to support basic operators such as add; subtract; and so on。 When imple
menting the operators; be careful to do a logically correct implementation。
o To be able to use methods or properties on generics parameters; they need to be
constrained。 Constraints are an effective way of indicating basic functionality possessed
by generics types。 Even though you could usually achieve the same results using
interfaces; that approach is not as elegant。
o Visual Basic has the GoTo keyword; even though some consider the use of GoTo as poor
programming。 Visual Basic has ensured that you can’t easily shoot yourself in the foot。
o The nullable type is used to indicate whether or not a value type has been assigned。 You
will use this type when interacting with a database type。
o Partial methods and classes are useful in the context of autogenerated source code。 They
make it easier to split apart the functionality that is autogenerated and store it in one file;
while the hand…coded part is stored in another file。 They can also be used in place of
conditional pilation constants。
…………………………………………………………Page 453……………………………………………………………
CH AP T E R 1 6 ■ L E A R N I N G A B OU T O TH E R V IS U AL B A SI C T E C HN IQ U E S 431
Some Things for You to Do
The following two exercises are the final ones this book。
1。 Build a two…dimensional matrix class that supports the + and operators。
2。 Write a question to the author asking him to solve two problems that you have encoun
tered。 Send the e…mail to christianhgross@gmail。。
…………………………………………………………Page 454……………………………………………………………
…………………………………………………………Page 455……………………………………………………………
Index
■Special Characters AddNumbers() method; 428
# (hash character); 149 AddRoomGrouping() method; 214
_ (underscore) character; 11 AddRoomToGrouping() method; 219
|| (OR) operator; 109 AddValue() method; 278
ADO (ActiveX Data Object); 375
■A
ADO; accessing relational databases
a 《 b expression; 108
using; 382–386
a b expression; 108 deleting data from; 386
a 》= b expression; 109 selecting data from tables; 385
!a expression; 109 AI (artificial intelligence) system; 77
a variable; 418
algorithm; 77
Abort() method; 347
allo test; 63; 64
abstracting instantiations with factories; alloappend test; 64
177–178
Alpha; 334
abstraction; 376
altering data; 408–409
accessing relational databases; 375; 382–386 American Standard Code for Information
AcquireReaderLock() method; 359 Interchange (ASCII); 68
AcquireWriterLock() method; 359 _amount data member; 179
action method; 120
And operator; 109
ActiveCurrencyTrader class; 147; 152–155 AndAlso operator; 109
adding constructor to; 152–153 anonymous types; selecting with; 409
adding conversion methods to; 154–155 Another instance; 232
defining informational read…only API (application programming interface); 59
properties; 153–154
Append() method; 281
ActiveCurrencyTrader() method; 159
application development。
ActiveX Data Object (ADO); 375 See development; software
Add() method; 33–40; 43; 47; 231
application mode; 117
writing; 33–35 application programming interface (API); 59
writing code to test; 35 appSettings folder; 321
adding test projects; 36 AppSettings property; 322
testing addition of two large section; 321–322; 330; 339
numbers; 38
Architectural code; 138
testing simple addition; 37–38
AreYouPreHeated() method; 144
identifier; 321
ArgumentException() method; 120
addition operator; 417
433
…………………………………………………………Page 456……………………………………………………………
434 ■IN D E X
ArgumentException type; 128 base classes; 135; 138–139; 151–152; 165;
ArgumentNullException type; 128 174–178
ArgumentOutOfRangeException type; 128 abstracting instantiations with factories;
arithmetic operators 177–178
addition; 417 overriding for specialized
bitwise; 419 functionality; 176
ArithmeticException type; 128 base functionality; 182–188
ArrayList class; 230 base。CalculateTaxToPay() method; 176
ArrayList instance; 231 BaseGenerated class; 428
arrays; 204–205 BaseLinked class; 206
artificial intelligence (AI) system; 77 BaseLinkedListItem class; 207–208
ASCII (American Standard Code for Base。Method() method; 193
Information Interchange); 68 BaseTaxEngine class; 182
assemblies BaseTaxEngine interface; 177
dynamic loading of; 322–331 BaseTaxEngine。CalculateTaxToPay()
dynamically instantiating types; method; 176
322–326 BaseType parameter; 301
enhancing configuration files; 326–331 BaseType references; 294
dynamic loading of strongly named; BeginRead() method; 367
331–336 Behavioral functional; 174
relocating to GAC; 333 binary streams; 270; 284
using version numbers; 333–336 Binary2Text application; 249
signing; 317–318 Binary2Text。exe mand; 270
versioning; 335–336 BinaryFormatter class; 276
assembly variable; 324 bindingRedirect child element; 336
assemblyBinding configuration file; 336 bit; 44
AssemblyFileVersion attribute; 335 bitwise operators; 419
assemblyIdentity child element; 336 black box context; 285
AssemblyInfo。vb file; 335 bool properties; 203
Assembly。Load() method; 332 Bootstrap class; 284
AssemblyVersion attribute; 335 bootstrap code; 253
AssignCellState() method; 305–307 BreadthFirstSearch class; 99
assignment operator; 417 brute force; 80
AssumeReferenceType interface; 426 buffer parameter; 132
asynchronous techniques; 367 buffer。Trim property; 61
AsyncState data member; 368 Build tab; 318
AsyncWaitHandle。WaitOne() method; 368 Button control; 8
attributes; 274 Button1_Click function; 10
Attributes data member; 418 ByRef keyword; 86
availableTypes dictionary collection; 330 byte; 44
Byte type; 44
■B ByVal keyword; 86
backToDerived variable; 195
backward…patibility; 399 ■C
Base; Base。Method() method; 189 Calculate() method; 311
CalculateArea() method; 168
…………………………………………………………Page 457……………………………………………………………
■I N D E X 435
_calculatedTaxable data member; 176 defining references; 15
CalculateTaxToPay() method; 175 moving functionality; 15
calculator application variables; 17–19
Add() method; 33–35 classes
development of; 26–30 declaring; 81
finishing; 47 defining Node elements by switching
numbers; puter understanding to; 94
of; 40–41 ClassLibrary。Class1。HelloWorld() method; 16
快捷操作: 按键盘上方向键 ← 或 → 可快速上下翻页 按键盘上的 Enter 键可回到本书目录页 按键盘上方向键 ↑ 可回到本页顶部!
温馨提示: 温看小说的同时发表评论,说出自己的看法和其它小伙伴们分享也不错哦!发表书评还可以获得积分和经验奖励,认真写原创书评 被采纳为精评可以获得大量金币、积分和经验奖励哦!