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

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