| Method | Açıklama |
|---|
ToBoolean | Veriyi, Boolean değerine dönüştürür. |
ToByte | Veriyi, Byte değerine dönüştürür. |
ToChar | Veriyi, Char değerine dönüştürür. |
ToDateTime | Veriyi, Date-Time yapısına dönüştürür. |
ToDecimal | Veriyi, Decimal tipte değere dönüştürür. |
ToDouble | Veriyi, Double tipte değere dönüştürür. |
ToInt16 | Veriyi, 16 bit integer tipte değere dönüştürür. |
ToInt32 | Veriyi, 32 bit integer tipte değere dönüştürür. |
ToInt64 | Veriyi, 64 bit integer tipte değere dönüştürür. |
ToSbyte | Veriyi, signed byte tipte değere dönüştürür. |
ToSingle | Veriyi, small floating point sayısal değere dönüştürür. |
ToString | Veriyi, small floating point sayısal değere dönüştürür. |
ToType | Converts a type to a specified type. |
ToUInt16 | Converts a type to an unsigned int type. |
ToUInt32 | Converts a type to an unsigned long type. |
ToUInt64 | Converts a type to an unsigned big integer. |
using System;
namespace TypeConversionApplication {
class StringConversion {
static void Main(string[] args) {
int i = 75;
float f = 53.005f;
double d = 2345.7652;
bool b = true;
Console.WriteLine(i.ToString());
Console.WriteLine(f.ToString());
Console.WriteLine(d.ToString());
Console.WriteLine(b.ToString());
Console.ReadKey();
}
}
}