Format a Color enumeration value in (D) Decimal number : Console Format « 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 » Console Format 




Format a Color enumeration value in (D) Decimal number
 

Imports System
Imports Microsoft.VisualBasic

Class Sample
   Public Enum Color
      Yellow = 1
      Blue = 2
      Green = 3
   End Enum 'Color
   Public Shared Sub Main()
      Console.Clear()

      Console.WriteLine("Standard Enumeration Format Specifiers")
      Console.WriteLine("(G) General:. . . . . . . . . {0:G}" & vbCrLf & _
                        "    (default):. . . . . . . . {0} (default = 'G')" & vbCrLf & _
                        "(F) Flags:. . . . . . . . . . {0:F} (flags or integer)" & vbCrLf & _
                        "(D) Decimal number: . . . . . {0:D}" & vbCrLf & _
                        "(X) Hexadecimal:. . . . . . . {0:X}" & vbCrLf, _
                        Color.Green)

   End Sub 'Main
End Class 'Sample

   
  














Related examples in the same category
1.Format a negative integer or floating-point number in Currency format
2.Format a negative integer or floating-point number in Decimal format
3.Format a negative integer or floating-point number in Scientific format
4.Format a negative integer or floating-point number in Fixed point format
5.Format a negative integer or floating-point number in General format
6.Format a negative integer or floating-point number in default format
7.Format a negative integer or floating-point number in Number format
8.Format a negative integer or floating-point number in Percent format
9.Format a negative integer or floating-point number in Round-trip format
10.Format a negative integer or floating-point number in Hexadecimal format
11.Format the current date in (d) Short date
12.Format the current date in (D) Long date
13.Format the current date in (t) Short time
14.Format the current date in (T) Long time
15.Format the current date in (f) Full date/short time
16.Format the current date in (F) Full date/long time
17.Format the current date in (g) General date/short time
18.Format the current date in (G) General date/long time
19.Format the current date in (M) Month
20.Format the current date in (R) RFC1123
21.Format the current date in (s) Sortable
22.Format the current date in (u) Universal sortable
23.Format the current date in (U) Universal full date/time
24.Format the current date in (Y) Year
25.Format a Color enumeration value in (G) General
26.Format a Color enumeration value in (default)
27.Format a Color enumeration value in (F) Flags
28.Format a Color enumeration value in (X) Hexadecimal
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.