Convert.ToString (Int16, IFormatProvider) converts 16-bit signed integer to string using culture-specific format : Convert to String « Development « VB.Net

Home
VB.Net
1.2D
2.Application
3.Class
4.Data Structure
5.Data Types
6.Database ADO.net
7.Date Time
8.Development
9.Event
10.File Directory
11.Generics
12.GUI
13.Internationalization I18N
14.Language Basics
15.LINQ
16.Network Remote
17.Reflection
18.Security
19.Thread
20.Windows Presentation Foundation
21.Windows System
22.XML
23.XML LINQ
VB.Net » Development » Convert to StringScreenshots 
Convert.ToString (Int16, IFormatProvider) converts 16-bit signed integer to string using culture-specific format
  

Class Sample
   Public Shared Sub Main()
        Dim numbers() As Short = Int16.MinValue, Int16.MaxValue}
        Dim nfi As New System.Globalization.NumberFormatInfo()
        nfi.NegativeSign = "~"
        nfi.PositiveSign = "!"
        
        For Each number As Short In numbers
           Console.WriteLine("{0,-8}  -->  {1,8}", _
                             Convert.ToString(number, System.Globalization.CultureInfo.InvariantCulture), _
                             Convert.ToString(number, nfi))
        Next
    End Sub 
End Class

   
    
  
Related examples in the same category
1.Convert.ToString (Boolean) converts Boolean value to string representation.
2.Convert.ToString (Byte, IFormatProvider) converts 8-bit unsigned integer to string with culture-specific format
3.Convert.ToString (Byte, Int32) converts 8-bit unsigned integer to string in a base.
4.Convert.ToString (Char) converts Unicode character to string
5.Convert.ToString (DateTime) converts DateTime to string
6.Convert.ToString (DateTime, IFormatProvider) converts DateTime to string using culture-specific format
7.Convert.ToString (Decimal, IFormatProvider) converts decimal number to string using culture-specific format
8.Convert.ToString (Double) converts double-precision floating-point number to string
9.Convert.ToString (Double, IFormatProvider) converts specified double-precision floating-point number to string
10.Convert.ToString (Int16) converts 16-bit signed integer to string
11.Convert.ToString (Int16, Int32) converts 16-bit signed integer to string in a base.
12.Convert.ToString (Int32) converts 32-bit signed integer to string
13.Convert.ToString (Int32, IFormatProvider) converts 32-bit signed integer to string with culture-specific format
14.Convert.ToString (Int32, Int32) converts 32-bit signed integer to string in a base.
15.Convert.ToString (Int64) converts 64-bit signed integer to string.
16.Convert.ToString (Int64, IFormatProvider) converts 64-bit signed integer to string using culture-specific format
17.Convert.ToString (Int64, Int32) converts 64-bit signed integer to string in a specified base.
18.Convert.ToString (Object) converts object to string
19.Convert.ToString (SByte) converts 8-bit signed integer to string
20.Convert.ToString (SByte, IFormatProvider) converts 8-bit signed integer to string using culture-specific format
21.Convert.ToString (Single) converts single-precision floating-point number to string
22.Convert.ToString (Single, IFormatProvider) converts single-precision number to string with culture-specific format
23.Convert.ToString (UInt16) converts 16-bit unsigned integer to string
24.Convert.ToString (UInt16, IFormatProvider) converts 16-bit unsigned integer to string with culture format
25.Convert.ToString (UInt32) converts 32-bit unsigned integer to string
26.Convert.ToString (UInt32, IFormatProvider) converts 32-bit unsigned integer to string with culture format
27.Convert.ToString Method converts the value of the specified 64-bit unsigned integer to string
28.Convert.ToString (UInt64, IFormatProvider) converts 64-bit unsigned integer to string with culture format
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.