AmitDiwan has Published 8359 Articles

Char.ToString() Method in C#

AmitDiwan

AmitDiwan

Updated on 07-Nov-2019 05:39:47

192 Views

The Char.ToString() method in C# is used to convert the value of this instance to its equivalent string representation.SyntaxFollowing is the syntax −public override string ToString ();ExampleLet us now see an example to implement the Char.ToString() method −using System; public class Demo {    public static void Main(){     ... Read More

Char.ToLowerInvariant(Char) Method in C#

AmitDiwan

AmitDiwan

Updated on 06-Nov-2019 08:06:14

246 Views

The Char.ToLowerInvariant() method in C# is used to convert the value of a Unicode character to its lowercase equivalent using the casing rules of the invariant culture.OutputFollowing is the syntax −public static char ToLowerInvariant (char ch);Above, the parameter ch is the Unicode character to convert.ExampleLet us now see an example ... Read More

Char.Parse(String) Method in C#

AmitDiwan

AmitDiwan

Updated on 06-Nov-2019 08:04:37

4K+ Views

The Char.Parse(String) method in C# is used to convert the value of the specified string to its equivalent Unicode character.SyntaxFollowing is the syntax −public static char Parse (string str);Above, the string str is a string that contains a single character or null.ExampleLet us now see an example to implement the ... Read More

Decimal.ToSingle() Method in C#

AmitDiwan

AmitDiwan

Updated on 06-Nov-2019 08:03:00

180 Views

The Decimal.ToSingle() method in C# is used to convert the value of the specified Decimal to the equivalent single-precision floating-point number.SyntaxFollowing is the syntax −public static float ToSingle (decimal val);Above, Val is the decimal number to convert.ExampleLet us now see an example to implement the Decimal.ToSingle() method −using System; public ... Read More

Decimal.ToSByte() Method in C#

AmitDiwan

AmitDiwan

Updated on 06-Nov-2019 08:01:34

88 Views

The Decimal.ToSByte() method in C# is used to convert the value of the specified Decimal to the equivalent 8-bit signed integer.SyntaxFollowing is the syntax −public static sbyte ToSByte (decimal val);Above, Val is the decimal number to convert.ExampleLet us now see an example to implement the Decimal.ToSByte() method −using System; public ... Read More

Decimal.ToOACurrency() Method in C#

AmitDiwan

AmitDiwan

Updated on 06-Nov-2019 07:59:34

126 Views

The Decimal.ToOACurrency() method in C# is used to convert the specified Decimal value to the equivalent OLE Automation Currency value, which is contained in a 64-bit signed integer.SyntaxFollowing is the syntax −public static long ToOACurrency (decimal val);Above, Val is the decimal number to convert.ExampleLet us now see an example to ... Read More

Type.GetEnumValues() Method in C#

AmitDiwan

AmitDiwan

Updated on 06-Nov-2019 07:10:29

415 Views

The Type.GetEnumValues() method in C# returns an array of the values of the constants in the current enumeration type.SyntaxFollowing is the syntax −public virtual Array GetEnumValues ();ExampleLet us now see an example to implement the Type.GetEnumValues() method −using System; public class Demo {    enum Vehicle {Car, Bus, Bike, Airplane} ... Read More

Type.GetEnumUnderlyingType() Method in C#

AmitDiwan

AmitDiwan

Updated on 06-Nov-2019 07:07:27

140 Views

The Type.GetEnumUnderlyingType() method in C# is used to return the underlying type of the current enumeration type.SyntaxFollowing is the syntax −public virtual Type GetEnumUnderlyingType ();ExampleLet us now see an example to implement the Type.GetEnumUnderlyingType() method −using System; public class Demo {    enum Vehicle {Car, Bus, Bike, Airplane}    public ... Read More

Type.GetEnumNames() Method in C#

AmitDiwan

AmitDiwan

Updated on 06-Nov-2019 07:03:50

132 Views

The Type.GetEnumNames() method in C# is used to return the names of the members of the current enumeration type.SyntaxFollowing is the syntax −public virtual string[] GetEnumNames ();ExampleLet us now see an example to implement the Type.GetEnumNames() method −using System; public class Demo {    enum Vehicle {Car, Bus, Bike}   ... Read More

How to create 1-Tuple or Singleton Tuple in C#?

AmitDiwan

AmitDiwan

Updated on 06-Nov-2019 06:59:07

190 Views

The Tuple class represents a 1-tuple, which is called singleton. A tuple is a data structure that has a sequence of elements.ExampleLet us now see an example to implement the 1-tuple in C# −using System; public class Demo {    public static void Main(string[] args) {       Tuple ... Read More

Advertisements