Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Server Side Programming Articles
Page 689 of 2109
Check whether the specified Unicode character is a letter or a decimal digit in C#
To check whether the specified Unicode character is a letter or a decimal digit in C#, use the Char.IsLetterOrDigit() method. This method returns true if the character is a letter (uppercase or lowercase) or a decimal digit (0-9), and false otherwise. Syntax Following is the syntax for the Char.IsLetterOrDigit() method − public static bool IsLetterOrDigit(char c) Parameters c: The Unicode character to evaluate. Return Value Returns true if the character is a letter or decimal digit; otherwise, false. Using IsLetterOrDigit with Decimal Digits Example ...
Read MoreChar.IsSeparator () Method in C#
The Char.IsSeparator() method in C# indicates whether the specified Unicode character is categorized as a separator character. This method checks if the character belongs to the separator category in Unicode, which includes space characters, line separators, and paragraph separators. Syntax Following is the syntax − public static bool IsSeparator(char ch); Parameters ch − The Unicode character to evaluate. Return Value Returns true if the character is categorized as a separator; otherwise, false. Types of Separator Characters The Unicode separator category includes three subcategories − Space Separator ...
Read MoreMathF.Atan2() Method in C# with Examples
The MathF.Atan2() method in C# returns the angle whose tangent is the quotient of two specified floating-point numbers. It calculates the arctangent of y/x and returns the angle in radians between the positive x-axis and the point (x, y). This method is particularly useful for determining the angle of a point in a coordinate system and handles all four quadrants correctly, unlike the regular arctangent function. Syntax Following is the syntax − public static float Atan2(float y, float x); Parameters y − The y-coordinate of a point (numerator). x − The ...
Read MoreMathF.Acosh() Method in C# with Examples
The MathF.Acosh() method in C# returns the hyperbolic arc-cosine (inverse hyperbolic cosine) of a floating-point value. This method is part of the MathF class, which provides mathematical functions for float values with better performance than the double-precision Math class. The hyperbolic arc-cosine is defined for values greater than or equal to 1. For values less than 1, the method returns NaN (Not a Number). Syntax Following is the syntax for the MathF.Acosh() method − public static float Acosh(float val); Parameters val − A floating-point number representing the hyperbolic cosine value. Must ...
Read MoreMathF.Asinh() Method in C# with Examples
The MathF.Asinh() method in C# returns the inverse hyperbolic sine (arc hyperbolic sine) of a specified single-precision floating-point number. This method is part of the System namespace and is commonly used in mathematical calculations involving hyperbolic functions. The inverse hyperbolic sine function is the inverse of the hyperbolic sine function. For any real number x, Asinh(x) returns the value y such that sinh(y) = x. Syntax Following is the syntax for the MathF.Asinh() method − public static float Asinh(float val); Parameters val − A single-precision floating-point number representing the hyperbolic sine ...
Read MoreMathF.Atan() Method in C# with Examples
The MathF.Atan() method in C# is used to return the angle whose tangent is given as a float value argument. This method returns the arctangent (inverse tangent) of the specified number, with the result expressed in radians between -π/2 and π/2. Syntax Following is the syntax for the MathF.Atan() method − public static float Atan (float val); Parameters val − A float representing a tangent value. This parameter can be any real number including positive infinity, negative infinity, or NaN (Not a Number). Return Value The method ...
Read MoreChar.IsHighSurrogate(String, Int32) Method in C#
The Char.IsHighSurrogate(String, Int32) method in C# determines whether the character at the specified position in a string is a high surrogate. High surrogates are Unicode code units in the range U+D800 to U+DBFF, used as the first part of surrogate pairs to represent characters beyond the Basic Multilingual Plane. Syntax Following is the syntax − public static bool IsHighSurrogate(string str, int index); Parameters str − The string to evaluate. index − The position of the character to evaluate in the string. Return Value Returns true ...
Read MoreChar.IsLetter() Method in C#
The Char.IsLetter() method in C# is used to determine whether a specified Unicode character is categorized as a Unicode letter. This method returns true if the character is a letter (uppercase or lowercase), and false otherwise. This method is particularly useful for input validation, text processing, and character classification in applications where you need to distinguish letters from numbers, symbols, or other character types. Syntax Following is the syntax − public static bool IsLetter(char ch); Parameters ch − The Unicode character to evaluate. Return Value Returns ...
Read MoreHow to change the Foreground Color of Text in C# Console?
To change the foreground color of text in C# console applications, use the Console.ForegroundColor property. This property accepts a ConsoleColor enumeration value and affects all subsequent text output until changed again. Syntax Following is the syntax for setting console foreground color − Console.ForegroundColor = ConsoleColor.ColorName; To reset to default colors, use − Console.ResetColor(); Available Colors The ConsoleColor enumeration provides the following color options − Color Name Description Black, DarkBlue, DarkGreen, DarkCyan Dark color variants DarkRed, DarkMagenta, DarkYellow, Gray Medium ...
Read MoreHow to change the CursorLeft of the Console in C#?
The Console.CursorLeft property in C# allows you to set or get the horizontal position of the cursor within the console window. This property is useful for positioning text at specific columns, creating formatted output, or building text-based user interfaces. Syntax Following is the syntax for setting the cursor's left position − Console.CursorLeft = columnPosition; To get the current cursor position − int currentPosition = Console.CursorLeft; Parameters The CursorLeft property accepts an integer value representing the column position (0-based indexing) where the cursor should be positioned. The value must be ...
Read More