String Formatting

ConnyD

Member
Joined
Oct 1, 2006
Messages
8
Programming Experience
1-3
I've employed some sample code from the internet. I'll get to the point can anyone tell me what the 'c' character achieves in the following :

Dim myChar as Char = "_"c

The code works fine with or without the appended 'c'

Thank You
 
If you turn on Option Strict in compiler options (recommended) you will see the problem of Char = "_"
Option Strict On disallows implicit conversions from 'String' to 'Char'.
The c literal type character forces that string containing one character to be read as Char type. Type Characters
 
Back
Top