Help

Team Fly 

Page 3

a replacement for classic VB's user-defined types, and you should never use them. OOP experts say that whenever you're tempted to use a structure, create a class instead—it's more flexible. Of course other OOP experts disagree, and the squabbling begins.)

Help!

A significant effect of the merging in of VB with C-style languages is that the VB.NET Help system and documentation were mostly written by C programmers. These people are not generally writers nor are they very familiar with Visual Basic. That's why you find techno-speak error messages, convoluted descriptions in the Help system, and other foggy patches.

So, instead of VB's justly acclaimed clarity, we get Help descriptions that sound like they were written by a barmy IRS bureaucrat. Here's an example:

Changing the value of a field or property associated with any one instance does not affect the value of fields or properties of other instances of the class. On the other hand, when you change the value of a shared field and property associated with an instance of a class, you change the value associated with all instances of the class.

Got it?

Not only is the VB.NET documentation all-too-often puzzling, the fact that C programmers wrote it means that the descriptions and even the source code examples are often some half-English, half-C beast.

Many Help source code examples listed as ''VB.NET" versions are, in fact, written by C programmers. VB programmers must spend the time to translate this faux VB code. It's great that there is now so much tested, bug-free example code in Help. However, perhaps Microsoft would be wise to ask experienced VB programmers to go over the pseudo "Visual Basic" code examples, and translate them into actual VB-style programming.

For example, take a look at the entry in Help for String.IndexOf. If you scroll down the right pane, you can see all the ways that the sample code is not typical VB code. Many VB programmers will have to figure out how to actually make this code work. It can't just be copied and pasted.

VB programmers can be confused by some of the strange punctuation and other odd qualities of the following, and many other examples you find in Help. Although nominally Visual Basic source code, too many Help examples are alien in many particulars, as you can see in this sample code illustrating the IndexOf method:

 Imports System Class Sample Public Shared Sub Main() Dim br1 As String = _ "0----+----1----+----2----+----3----+----4----+----5----+----6----+-" Dim br2 As String = _ "0123456789012345678901234567890123456789012345678901234567890123456" Dim str As String = _ "Now is the time for all good men to come to the aid of their party." Dim start As Integer 
Team Fly 


Visual Basic  .NET Power Tools
Visual Basic .NET Power Tools
ISBN: 0782142427
EAN: 2147483647
Year: 2003
Pages: 178

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net