Imports System
Imports System.Globalization
Imports Microsoft.VisualBasic
Public Class DummyProvider
Implements IFormatProvider
Public Function GetFormat( argType As Type ) As Object _
Implements IFormatProvider.GetFormat
Console.Write( "{0,-40}", argType.ToString( ) )
Return Nothing
End Function
End Class
Module MainClass
Sub Main( )
Dim provider As New DummyProvider( )
Dim converted As String
Dim Int32A As Integer = -252645135
converted = Convert.ToString( Int32A, provider )
Console.WriteLine( "Int32 {0}", converted )
End Sub
End Module
|