Summary

Team Fly 

Page 57

        Console.WriteLine(d1.Price)
        Console.WriteLine(ar(2))

    End Sub

End Class

Notice that in this example, you created a stream (fs1) and then used it to deserialize both your Donut structure and the ArrayList. One stream can handle multiple serializations or deserializations.

Summary

This chapter is a kind of mini-encyclopedia of the primary differences between classic Basic's popular techniques and the way they're handled—the dissimilar way they're handled—in VB.NET.

I chose these particular techniques because of their usefulness, and the frequency with which most programmers use them in their projects, but also because they are handled in what traditional Basic programmers may consider unusual, novel, or counterintuitive ways. For example, in .NET setting Properties in Form1 from within the code of Form2 is not straightforward (this used to be easy).

You should be able to glance through the section titles in this chapter to locate the solution to a problem that's bothering you. I cover saving and loading data, including new techniques such as serialization (which saves disparate kinds of data); control arrays and other types of arrays, and the new methods available for sorting and searching them; date/time manipulations; random numbers; trapping keypresses; managing the Registry; loading graphics; the new flexible data binding; and so on. I don't claim that this chapter contains anywhere near the total list of differences between traditional Basic and VB.NET—only that it's a collection of many of the more significant, and less obvious, differences.

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