Parsing strings to create data types : Data Type : Data Type C# Examples


C# Examples » Data Type » Data Type »

 

Parsing strings to create data types








Structure
Conversion Method


Decimal
static decimal Parse(string str)


Double
static double Parse(string str)


Single
static float Parse(string str)


Int64
static long Parse(string str)


Int32
static int Parse(string str)


Int16
static short Parse(string str)


UInt64
static ulong Parse(string str)


UInt32
static uint Parse(string str)


UInt16
static ushort Parse(string str)


Byte
static byte Parse(string str)


SByte
static sbyte Parse(string str)







    
using  System;

class  MainClass
{
        public  static  void  Main(string[]  args)
        {
        bool  myBool  =  bool.Parse("True");
        Console.WriteLine("->  Value  of  myBool:  {0}",  myBool);
        }
}
    
   
  
   



Output

-> Value of myBool: True


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Data Type
» Data Type