Articles on Trending Technologies

Technical articles with clear explanations and examples

Char.IsLetter() Method in C#

AmitDiwan
AmitDiwan
Updated on 13-Nov-2019 2K+ Views

The Char.IsLetter() method in C# is used to indicate whether the specified Unicode character is categorized as a Unicode letter.SyntaxFollowing is the syntax −public static bool IsLetter (char ch);Above, the parameter ch is the Unicode character to evaluate.ExampleLet us now see an example to implement the Char.IsLetter() method −using System; public class Demo {    public static void Main(){       bool res;       char val = 'K';       Console.WriteLine("Value = "+val);       res = Char.IsLetter(val);       Console.WriteLine("Is the value a letter? = "+res);    } }OutputThis will produce the following ...

Read More

Char.IsHighSurrogate(String, Int32) Method in C#

AmitDiwan
AmitDiwan
Updated on 13-Nov-2019 207 Views

The Char.IsHighSurrogate() method in C# indicates whether the Char object at the specified position in a string is a high surrogate.SyntaxFollowing is the syntax −public static bool IsHighSurrogate (string str, int index);Above, str is a string, whereas the index is the position of the character to evaluate in str.ExampleLet us now see an example to implement the Char.IsHighSurrogate() method −using System; public class Demo {    public static void Main(){       string str = new String(new char[] { 'k', 'm', 'g', 't', '\uD800' });       bool res = Char.IsHighSurrogate(str, 4);       if (res)   ...

Read More

Char.IsDigit() Method in C#

AmitDiwan
AmitDiwan
Updated on 13-Nov-2019 2K+ Views

The Char.IsDigit() method in C# indicates whether the specified Unicode character is categorized as a decimal digit.SyntaxFollowing is the syntax −public static bool IsDigit (char ch);Above, the parameter ch is the Unicode character to evaluate.ExampleLet us now see an example to implement the Char.IsDigit() method −using System; public class Demo {    public static void Main(){       bool res;       char val = 'g';       Console.WriteLine("Value = "+val);       res = Char.IsDigit(val);       Console.WriteLine("Is the value a digit? = "+res);    } }OutputThis will produce the following output −Value = ...

Read More

MathF.Atan() Method in C# with Examples

AmitDiwan
AmitDiwan
Updated on 13-Nov-2019 128 Views

The MathF.Atan() method in C# is used to return the angle whose tangent is given as a float value argument.SyntaxFollowing is the syntax −public static float Atan (float val);Above, Val is the floating-point value.ExampleLet us now see an example to implement the MathF.Atan() method −using System; public class Demo {    public static void Main(){       float val1 = 1.2f;       float val2 = 45.5f;       Console.WriteLine("Angle (val1) = "+(MathF.Atan(val1)));       Console.WriteLine("Angle (val2) = "+(MathF.Atan(val2)));    } }OutputThis will produce the following output −Angle (val1) = 0.876058 Angle (val2) = 1.548822ExampleLet us ...

Read More

MathF.Asinh() Method in C# with Examples

AmitDiwan
AmitDiwan
Updated on 13-Nov-2019 124 Views

The MathF.Asinh() method in C# is used to return the hyperbolic arc-sine of a floating-point value.SyntaxFollowing is the syntax −public static float Asinh (float val);ExampleLet us now see an example to implement the MathF.Asinh() method −using System; public class Demo {    public static void Main(){       float val1 = 1.2f;       float val2 = 45.5f;       Console.WriteLine("Angle (val1) = "+(MathF.Asinh(val1)));       Console.WriteLine("Angle (val2) = "+(MathF.Asinh(val2)));    } }OutputThis will produce the following output −Angle (val1) = 1.015973 Angle (val2) = 4.51098ExampleLet us now see another example to implement the MathF.Asinh() method ...

Read More

MathF.Acosh() Method in C# with Examples

AmitDiwan
AmitDiwan
Updated on 13-Nov-2019 142 Views

The MathF.Acosh() method in C# is used to return the hyperbolic arc-cosine of a floating-point value.SyntaxFollowing is the syntax −public static float Acosh (float val);Above, Val is the floating-point number.ExampleLet us now see an example to implement the MathF.Acosh() method −using System; public class Demo {    public static void Main(){       float val1 = 0.1f;       float val2 = 0.9f;       Console.WriteLine("Angle (val1) = "+(MathF.Acosh(val1)));       Console.WriteLine("Angle (val2) = "+(MathF.Acosh(val2)));    } }OutputThis will produce the following output −Angle (val1) = NaN Angle (val2) = NaNExampleLet us now see another example ...

Read More

MathF.Atan2() Method in C# with Examples

AmitDiwan
AmitDiwan
Updated on 13-Nov-2019 251 Views

The MathF.Atan2() method in C# returns the angle whose tangent is the quotient of two floating-point numbers.SyntaxFollowing is the syntax −public static float Atan2 (float val1, float val2);Above, val1 is the x-coordinate of a point, whereas val2 is the y-coordinate.ExampleLet us now see an example to implement the MathF.Atan2() method −using System; public class Demo {    public static void Main(){       float val1 = 0.1f;       float val2 = 0.9f;       Console.WriteLine("Return value = "+(MathF.Atan2(val1, val2)));    } }OutputThis will produce the following output −Return value = 0.1106572ExampleLet us now see another example ...

Read More

Char.IsSeparator () Method in C#

AmitDiwan
AmitDiwan
Updated on 13-Nov-2019 211 Views

The Char.IsSeparator() method in C# indicates whether the specified Unicode character is categorized as a separator character.SyntaxFollowing is the syntax −public static bool IsSeparator (char ch);Above. ch is the Unicode character to evaluate.ExampleLet us now see an example to implement the Char.IsSeparator() method −using System; public class Demo {    public static void Main(){       bool res;       char val = ', ';       Console.WriteLine("Value = "+val);       res = Char.IsSeparator(val);       Console.WriteLine("Is the value a separator? = "+res);    } }OutputThis will produce the following output −Value = , ...

Read More

Char.IsPunctuation() Method in C#

AmitDiwan
AmitDiwan
Updated on 13-Nov-2019 637 Views

The Char.IsPunctuation() method in C# indicates whether the specified Unicode character is categorized as a punctuation mark.SyntaxFollowing is the syntax −public static bool IsPunctuation (char ch);Above, ch is the Unicode character to evaluate.ExampleLet us now see an example to implement the Char.IsPunctuation() method −using System; public class Demo {    public static void Main(){       bool res;       char val = 'q';       Console.WriteLine("Value = "+val);       res = Char.IsPunctuation(val);       Console.WriteLine("Is the value a punctuation? = "+res);    } }OutputThis will produce the following output −Value = q Is ...

Read More

MathF.Abs() Method in C# with Examples

AmitDiwan
AmitDiwan
Updated on 13-Nov-2019 230 Views

The MathF.Abs() method in C# is used to return the absolute value of a float number.SyntaxFollowing is the syntax −public static float Abs (float val);Above, the parameter Val is the specified float number.ExampleLet us now see an example to implement the MathF.Abs() method −using System; public class Demo {    public static void Main(){       float val1 = 20.5f;       float val2 = -89.5f;       Console.WriteLine("Absolute float value1 = "+(MathF.Abs(val1)));       Console.WriteLine("Absolute float value2 = "+(MathF.Abs(val2)));    } }OutputThis will produce the following output −Absolute float value1 = 20.5 Absolute float value2 ...

Read More
Showing 54731–54740 of 61,248 articles
Advertisements