From the course: Visual Basic Essential Training
Unlock this course with a free trial
Join today to access over 24,500 courses taught by industry experts.
Convert and format numbers to strings - Visual Basic Tutorial
From the course: Visual Basic Essential Training
Convert and format numbers to strings
- [Instructor] When working with string conversions, the process is noticeably different from numeric-to numeric-conversions. Numeric conversions typically involve changing formats, such as from an integer to a floating-point number, which are straightforward since they share similar data structures. It's just a different way of storing number data. However, converting to or from a string often involves interpreting or formatting the values as text. In this video, we'll look at numeric to string conversion. In the next video, we'll look at parsing string data into numbers. Here's a quick review of converting between numeric types. Checkout line 85. We can use the .NET Convert class to explicitly convert from integer to double. The syntax is similar on line 86 where we convert from a double to an integer. For number to number, you can find all the conversion tools in the Convert class. Now let's look at how to convert a number type to a string. The top three examples on line 89 through…
Contents
-
-
-
-
-
-
-
-
-
(Locked)
Understanding strings6m 41s
-
(Locked)
Create string variables4m
-
(Locked)
Concatenation and interpolation2m 56s
-
(Locked)
Search string contents2m 59s
-
(Locked)
Modify string contents3m 3s
-
(Locked)
String creation with StringBuilder5m 39s
-
(Locked)
Compare and equals5m 51s
-
(Locked)
Convert and format numbers to strings8m 4s
-
(Locked)
Implicit covert strings to numbers2m 50s
-
(Locked)
Use Parse and TryParse conversions5m 4s
-
(Locked)
-
-
-
-
-
-
-
-
-
-
-