Download presentation
1
How to Work with Numeric and String Data
Murach, Chapter 4, Part III, pp 9/23/2008
2
Two Data Types Value types : variables Reference types: variables
Store their own data Are supported by a structure Reference types: variables Do not store their own data Store a reference to a memory location Two different string variables can reference the same string location. Supported by a class (object created from class) 9/23/2008
3
9/23/2008
4
9/23/2008
5
Murach’s Visual Basic 2008, C4
© 2008, Mike Murach & Associates, Inc.
6
Murach’s Visual Basic 2008, C4
© 2008, Mike Murach & Associates, Inc.
7
9/23/2008
8
9/23/2008
9
9/23/2008
10
Other ways to convert data types
ToString method Parse method Shared methods of the Convert class 9/23/2008
11
Murach’s Visual Basic 2008, C4
© 2008, Mike Murach & Associates, Inc.
12
Murach’s Visual Basic 2008, C4
© 2008, Mike Murach & Associates, Inc.
13
Murach’s Visual Basic 2008, C4
© 2008, Mike Murach & Associates, Inc.
14
Murach’s Visual Basic 2008, C4
© 2008, Mike Murach & Associates, Inc.
15
Murach’s Visual Basic 2008, C4
© 2008, Mike Murach & Associates, Inc.
16
Other methods to convert numbers to formatted strings
The ToString method with formatting codes The Format method of the String class Pp. 126 and 127 9/23/2008
17
Other chapter topics Variable Scope (on test)
Enumeration (not on test) – defines a set of related constants. Nullable types (not on test) – useful for databases 9/23/2008
18
Optional practice Exercise 4-1 9/23/2008
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.