Hi Brian,
The casting operators in VB.NET are DirectCast (if the object is already of
the requested type, such a base or an interface) or CType(when a type
conversion is required), but in your case of strings and integers:
- For conversions to String, you can use the ToString() method:
Dim s As String
Dim Joe1 As Integer = 20
s = Joe1.ToString() ' Notice that this is an overloaded method that can
receive the format as parameter
- For the converse operation, you use the Parse method of integers (with
proper exception handling omitted here):
Dim Joe2 As Integer
Joe2 = Integer.Parse(s)
--
Best regards,
Carlos J. Quintero
MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com