Internationalization and localization tools


VB.NET Type Conversion

In VB.NET, everything is regarded as an object. As a consequence, the primitive types can be used where objects are expected without any type conversion, and it is possible to call object methods on them directly. For example the following code will compile in VB.NET:

	Dim n As Integer // declare an integer
	n = 100
	Dim s As String
	s = n.ToString() // convert to a string for display 
			

This is in contrast to Java, where the basic types have no object-like behavior and need to be explicitly converted to and from object wrappers.

Of course, the output from the code above is not likely to be rendered in a culturally correct way. Here is where the NumberFormatInfo class comes into play; it acts as a formatter in the overloaded ToString method to provide a multiplicity of outputs.

Click on a function for more information:

FromString()

Parse()

ToString()

TypeConverter.ConvertTo ()

TypeConverter.ConvertFrom()

TypeConverter.ConvertFromString ()

TypeConverter.ConvertToString ()

 

 Locale-Sensitive Methods Table of Contents

 

Lingoport internationalization and localization services and software