C-Sharp ConvertToSingle Example – Code Sample Syntax
C-Sharp ConvertToSingle Example – Code Sample Syntax Purpose: – Illustrates using C-Sharp ConvertToSingle Code Example. View Other C-Sharp Source Code Examples Purpose: Converts positive and negative numbers into Single data type Syntax: Convert.ToSingle(expression) Parameters Description expression -3.402823E+38 through -1.401298E-45 for negative values; 1.401298E-45 through 3.402823E+38 for positive values Result... [Read More...]
C-Sharp ConvertToSByte Example – Code Sample Syntax
C-Sharp ConvertToSByte Example – Code Sample Syntax Purpose: – Illustrates using C-Sharp ConvertToSByte Code Example. View Other C-Sharp Source Code Examples Purpose: Converts positive and negative numbers into SByte data type Syntax: CSByte(expression) Parameters Description expression -128 through 127; fractional parts are rounded. Result Data Type Description SByte Signed Byte Quick Example Convert.ToSByte(1.33)... [Read More...]
C-Sharp ConvertToObject Example – Code Sample Syntax
C-Sharp ConvertToObject Example – Code Sample Syntax Purpose: – Illustrates using C-Sharp ConvertToObject Code Example. View Other C-Sharp Source Code Examples Purpose: Converts any valid expression into Object data type Syntax: (object)(expression) Parameters Description expression any valid expression Result Data Type Description object returns input as an object Quick Example (object)(“Ideal”)... [Read More...]
C-Sharp ConvertToInt64 Example – Code Sample Syntax
C-Sharp ConvertToInt64 Example – Code Sample Syntax Purpose: – Illustrates using C-Sharp ConvertToInt64 Code Example. View Other C-Sharp Source Code Examples Purpose: Converts positive and negative numbers into Long data type Syntax: Convert.ToInt64(expression) Parameters Description expression -9,223,372,036,854,775,808 through 9,223,372,036,854,775,807; fractional parts are rounded. Result Data Type Description Long returns... [Read More...]
C-Sharp ConvertToInt32 Example – Code Sample Syntax
C-Sharp ConvertToInt32 Example – Code Sample Syntax Purpose: – Illustrates using C-Sharp ConvertToInt32 Code Example. View Other C-Sharp Source Code Examples Purpose: Converts positive and negative numbers into Integer data type Syntax: Convert.ToInt32(expression) Parameters Description expression -2,147,483,648 through 2,147,483,647; fractional parts are rounded Result Data Type Description Integer returns integer Quick... [Read More...]
C-Sharp ConvertToInt16 Example – Code Sample Syntax
C-Sharp ConvertToInt16 Example – Code Sample Syntax Purpose: – Illustrates using C-Sharp ConvertToInt16 Code Example. View Other C-Sharp Source Code Examples Purpose: Converts positive and negative numbers into Short data type Syntax: Convert.ToInt16(expression) Parameters Description expression -32,768 through 32,767; fractional parts are rounded Result Data Type Description Short signed 16-bit (2-byte) integers Quick... [Read More...]
C-Sharp ConvertToDouble Example – Code Sample Syntax
C-Sharp ConvertToDouble Example – Code Sample Syntax Purpose: – Illustrates using C-Sharp ConvertToDouble Code Example. View Other C-Sharp Source Code Examples Purpose: Converts positive and negative numbers into double data type Syntax: Convert.ToDouble(expression) Parameters Description expression -1.79769313486231570E+308 through -4.94065645841246544E-324 for negative values; 4.94065645841246544E-324... [Read More...]
C-Sharp ConvertToDecimal Example – Code Sample Syntax
C-Sharp ConvertToDecimal Example – Code Sample Syntax Purpose: – Illustrates using C-Sharp ConvertToDecimal Code Example. View Other C-Sharp Source Code Examples Purpose: Converts positive and negative numbers into decimal data type Syntax: Convert.ToDecimal(expression) Parameters Description expression +/-79,228,162,514,264,337,593,543,950,335 for zero-scaled numbers, i.e., numbers with no decimal places. For... [Read More...]
C-Sharp ConvertToDateTime Example – Code Sample Syntax
C-Sharp ConvertToDateTime Example – Code Sample Syntax Purpose: – Illustrates using C-Sharp ConvertToDateTime Code Example. View Other C-Sharp Source Code Examples Purpose: Converts any valid date and time into date data type Syntax: Convert.ToDateTime(expression) Parameters Description expression any valid representation of date and time Result Data Type Description date returns date Quick Example Convert.ToDateTime(“September... [Read More...]
C-Sharp ConvertToChar Example – Code Sample Syntax
C-Sharp ConvertToChar Example – Code Sample Syntax Purpose: – Illustrates using C-Sharp ConvertToChar Code Example. View Other C-Sharp Source Code Examples Purpose: Converts Char or first character of string into Char data type Syntax: Convert.ToChar(expression) Parameters Description expression char or string Result Data Type Description Char only first character is used when expression is string Quick Example Convert.ToChar(“Test”)... [Read More...]
C-Sharp ConvertToByte Example – Code Sample Syntax
C-Sharp ConvertToByte Example – Code Sample Syntax Purpose: – Illustrates using C-Sharp ConvertToByte Code Example. View Other C-Sharp Source Code Examples Purpose: Converts 0 to 255 unsigned (rounded) into byte data type Syntax: Convert.ToByte(numeric expression) Parameters Description numeric expression 0 to 255 Result Data Type Description Byte 0 to 255 unsigned and parameter1 is rounded Quick Example Convert.ToByte(255)... [Read More...]