x4Trace Documentation v1.0
Loading...
Searching...
No Matches
Tools.Convert Class Reference

Represents a convert class. More...

Static Public Member Functions

static string HEX3ToNumberString (string hex3)
 Hexadecimal string to string of number.
 
static string ToBase64UTF8 (string str)
 Converts string to base64 string.
 
static string FromBase64UTF8 (string str)
 Converts base64 string to string.
 
static double ToDouble (string str)
 Converts string to double.
 
static decimal ToDecimal (string str)
 Converts string to decimal.
 
static decimal ToDecimal (string str, decimal defaultValue)
 Converts string to decimal.
 
static float ToFloat (string str)
 Converts string to float.
 
static int ToInt (string str)
 Converts string to int.
 
static long ToLong (string str)
 Converts string to long.
 
static DateTime ToDateTime (string str)
 Converts string to datetime.
 
static string ToString (System.Drawing.Color color)
 Converts color to string.
 
static string ToString (double num)
 Converts double to string.
 
static string ToString (float num)
 Converts float to string.
 
static string ToString (double num, int decimals)
 Converts double to string.
 
static System.Drawing.Color ToColor (string str)
 Converts color to string.
 
static byte ToByte (string str)
 Converts string to byte.
 
static void Cobs0Encode (byte[] b, int startindex)
 Encode bytes with cobs.
 
static void Cobs0Decode (byte[] b, int startIndex)
 Decode cobs.
 
static int FindNext (byte[] b, byte num, int startIndex)
 Find next zero of cobs.
 
static double InchesToMilimeter (double inches)
 Convert inches to milimeter.
 
static double CentiMeterToMiliMeter (double cm)
 Convert centimeter to milimeter.
 
static double InchesToCentiMeter (double inches)
 Convert inches to centimeter.
 
static double MiliMeterToCentiMeter (double mm)
 Converts milimeter to centimeter.
 
static double CentiMeterToInches (double cm)
 Converts centi meter to inch.
 
static double MiliMeterToInches (double mm)
 Converts milimeter to inches.
 
static double MiliMeterToMeter (double mm)
 Converts milimeter to meter.
 
static double InchesToMeter (double inches)
 Converts inches to meter.
 
static double CentiMeterToMeter (double cm)
 Converts centimeter to meter.
 
static double MeterToMiliMeter (double m)
 Converts meter to milli meter.
 
static double MeterToCentiMeter (double m)
 Converts meter to centi meter.
 
static double MeterToInches (double m)
 Converts meter to inches.
 
static bool IsNumber (char c)
 Returns true when the character is a number.
 
static bool IsInteger (string str)
 Returns true when the string is a number.
 
static bool IsDouble (string number)
 Returns true when the string is a double.
 

Static Public Attributes

static System.Globalization.NumberFormatInfo numberFormatInfo = System.Globalization.NumberFormatInfo.InvariantInfo
 Number format information.
 

Static Private Member Functions

static Convert ()
 Static initializer.
 

Detailed Description

Represents a convert class.

Member Function Documentation

◆ CentiMeterToInches()

static double Tools.Convert.CentiMeterToInches ( double cm)
static

Converts centi meter to inch.

Parameters
cmValue in centimeter.
Returns
Value in inches.

◆ CentiMeterToMeter()

static double Tools.Convert.CentiMeterToMeter ( double cm)
static

Converts centimeter to meter.

Parameters
cmValue in centimeter.
Returns
Value in meter.

◆ CentiMeterToMiliMeter()

static double Tools.Convert.CentiMeterToMiliMeter ( double cm)
static

Convert centimeter to milimeter.

Parameters
cmValue in centimeter.
Returns
Value in milimeter.

◆ Cobs0Decode()

static void Tools.Convert.Cobs0Decode ( byte[] b,
int startIndex )
static

Decode cobs.

Parameters
bBuffet.
startIndexIndex of start.

◆ Cobs0Encode()

static void Tools.Convert.Cobs0Encode ( byte[] b,
int startindex )
static

Encode bytes with cobs.

Parameters
bBuffer.
startindexIndex of start.

◆ FindNext()

static int Tools.Convert.FindNext ( byte[] b,
byte num,
int startIndex )
static

Find next zero of cobs.

Parameters
bBuffer.
numNumber of bytes.
startIndexIndex of start.
Returns
Next zero index.

◆ FromBase64UTF8()

static string Tools.Convert.FromBase64UTF8 ( string str)
static

Converts base64 string to string.

Parameters
strBase 64 string.
Returns
The string.

◆ HEX3ToNumberString()

static string Tools.Convert.HEX3ToNumberString ( string hex3)
static

Hexadecimal string to string of number.

Parameters
hex3String of hex number.
Returns
String of decimal number.

◆ InchesToCentiMeter()

static double Tools.Convert.InchesToCentiMeter ( double inches)
static

Convert inches to centimeter.

Parameters
inchesValue in inch.
Returns
Value in centimeter.

◆ InchesToMeter()

static double Tools.Convert.InchesToMeter ( double inches)
static

Converts inches to meter.

Parameters
inchesValue in inches.
Returns
Value in meter.

◆ InchesToMilimeter()

static double Tools.Convert.InchesToMilimeter ( double inches)
static

Convert inches to milimeter.

Parameters
inchesValue of inch.
Returns
Value in milimeter.

◆ IsDouble()

static bool Tools.Convert.IsDouble ( string number)
static

Returns true when the string is a double.

Parameters
numberThe string.
Returns
True when double.

◆ IsInteger()

static bool Tools.Convert.IsInteger ( string str)
static

Returns true when the string is a number.

Parameters
strThe string.
Returns
True when number.

◆ IsNumber()

static bool Tools.Convert.IsNumber ( char c)
static

Returns true when the character is a number.

Parameters
cCharacter.
Returns
True when number.

◆ MeterToCentiMeter()

static double Tools.Convert.MeterToCentiMeter ( double m)
static

Converts meter to centi meter.

Parameters
mValue in meter.
Returns
Value in centimeter.

◆ MeterToInches()

static double Tools.Convert.MeterToInches ( double m)
static

Converts meter to inches.

Parameters
mValue in meter.
Returns
Value in inches.

◆ MeterToMiliMeter()

static double Tools.Convert.MeterToMiliMeter ( double m)
static

Converts meter to milli meter.

Parameters
mValue in meter.
Returns
Value in milli meter.

◆ MiliMeterToCentiMeter()

static double Tools.Convert.MiliMeterToCentiMeter ( double mm)
static

Converts milimeter to centimeter.

Parameters
mmValue in milimeter.
Returns
Value in centimeter.

◆ MiliMeterToInches()

static double Tools.Convert.MiliMeterToInches ( double mm)
static

Converts milimeter to inches.

Parameters
mmValue in millimeter.
Returns
Value in inches.

◆ MiliMeterToMeter()

static double Tools.Convert.MiliMeterToMeter ( double mm)
static

Converts milimeter to meter.

Parameters
mmValue in milimeter.
Returns
Value in meter.

◆ ToBase64UTF8()

static string Tools.Convert.ToBase64UTF8 ( string str)
static

Converts string to base64 string.

Parameters
strThe string.
Returns
The base64 string.

◆ ToByte()

static byte Tools.Convert.ToByte ( string str)
static

Converts string to byte.

Parameters
strByte as string.
Returns
Byte value.

◆ ToColor()

static System.Drawing.Color Tools.Convert.ToColor ( string str)
static

Converts color to string.

Parameters
strColor as string.
Returns
The color.

◆ ToDateTime()

static DateTime Tools.Convert.ToDateTime ( string str)
static

Converts string to datetime.

Parameters
strDatetime as string.
Returns
The datetime.

◆ ToDecimal() [1/2]

static decimal Tools.Convert.ToDecimal ( string str)
static

Converts string to decimal.

Parameters
strNumber as string.
Returns
The decimal value.

◆ ToDecimal() [2/2]

static decimal Tools.Convert.ToDecimal ( string str,
decimal defaultValue )
static

Converts string to decimal.

Parameters
strNumber as string.
defaultValueThe default value.
Returns
The decimal value.

◆ ToDouble()

static double Tools.Convert.ToDouble ( string str)
static

Converts string to double.

Parameters
strNumber of string.
Returns
The double value.

◆ ToFloat()

static float Tools.Convert.ToFloat ( string str)
static

Converts string to float.

Parameters
strNumber as string.
Returns
The float value.

◆ ToInt()

static int Tools.Convert.ToInt ( string str)
static

Converts string to int.

Parameters
strNumber as string.
Returns
The int value.

◆ ToLong()

static long Tools.Convert.ToLong ( string str)
static

Converts string to long.

Parameters
strNumber as string.
Returns
The long value.

◆ ToString() [1/4]

static string Tools.Convert.ToString ( double num)
static

Converts double to string.

Parameters
numDouble value.
Returns
Double as string.

◆ ToString() [2/4]

static string Tools.Convert.ToString ( double num,
int decimals )
static

Converts double to string.

Parameters
numDouble value.
decimalsDecimals.
Returns
Double as string.

◆ ToString() [3/4]

static string Tools.Convert.ToString ( float num)
static

Converts float to string.

Parameters
numFloat value.
Returns
Float as string.

◆ ToString() [4/4]

static string Tools.Convert.ToString ( System.Drawing.Color color)
static

Converts color to string.

Parameters
colorColor value.
Returns
Color as string.

The documentation for this class was generated from the following file: