Server Side Programming Articles

Page 690 of 2109

How to change the CursorSize of the Console in C#?

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 289 Views

The Console.CursorSize property in C# allows you to change the size of the cursor in the console window. The cursor size is specified as a percentage of the character cell height, ranging from 1 to 100. Syntax Following is the syntax for setting the cursor size − Console.CursorSize = value; Parameters value − An integer between 1 and 100, representing the cursor size as a percentage of the character cell height. Using Console.CursorSize Property The cursor size can be set to different values to make it more ...

Read More

MathF.Cbrt() Method in C# with Examples

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 162 Views

The MathF.Cbrt() method in C# is used to return the cube root of a floating-point value. This method is part of the System namespace and works specifically with float data types, providing better performance than the generic Math.Cbrt() method when working with single-precision floating-point numbers. Syntax Following is the syntax − public static float Cbrt(float val); Parameters val − A floating-point number whose cube root is to be calculated. Return Value Returns a float value representing the cube root of the specified number. If the input is NaN (Not ...

Read More

MathF.Ceiling() Method in C# with Examples

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 501 Views

The MathF.Ceiling() method in C# is used to find the smallest integer greater than or equal to the specified float value. This method always rounds up to the next integer, even for negative numbers. Syntax Following is the syntax − public static float Ceiling (float val); Parameters val − A floating-point number whose ceiling value is to be calculated. Return Value Returns a float representing the smallest integer that is greater than or equal to the input value. MathF.Ceiling() Visualization ...

Read More

Uri.IsBaseOf(Uri) Method in C#

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 221 Views

The Uri.IsBaseOf() method in C# is used to determine whether the current Uri instance is a base of the specified Uri instance. This method is particularly useful when working with URL hierarchies and checking if one URI is a parent or base path of another URI. Syntax Following is the syntax − public bool IsBaseOf(Uri uri); Parameters uri − The specified Uri instance to test against the current Uri instance. Return Value Returns true if the current Uri instance is a base of the specified Uri; otherwise, false. ...

Read More

Uri.IsHexEncoding() Method in C#

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 125 Views

The Uri.IsHexEncoding() method in C# determines whether a character at a specific position in a string is hexadecimal encoded. This method is useful when working with URIs that contain percent-encoded characters, where hexadecimal encoding follows the pattern %XX (a percent sign followed by two hexadecimal digits). Syntax Following is the syntax − public static bool IsHexEncoding(string pattern, int index); Parameters pattern − The string to check for hexadecimal encoding. index − The zero-based position in the pattern where the check should begin. Return Value Returns ...

Read More

Uri.IsWellFormedOriginalString() Method in C#

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 130 Views

The Uri.IsWellFormedOriginalString() method in C# determines whether the original string used to construct a Uri object was well-formed and doesn't require additional escaping. This method returns true if the URI string is properly formatted according to RFC standards, and false otherwise. This method is particularly useful when validating URI strings before processing them or when you need to ensure that a URI doesn't contain characters that require percent-encoding. Syntax Following is the syntax for the IsWellFormedOriginalString() method − public bool IsWellFormedOriginalString(); Return Value The method returns a bool value − ...

Read More

UInt64 Struct in C#

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 486 Views

The UInt64 struct in C# represents a 64-bit unsigned integer with values ranging from 0 to 18, 446, 744, 073, 709, 551, 615. This struct provides various methods for comparison, equality checks, and other operations on unsigned 64-bit integers. UInt64 Value Range 0 18, 446, 744, 073, 709, 551, 615 64-bit Unsigned Integer 2^64 - 1 possible values UInt64.CompareTo() Method The UInt64.CompareTo() method compares the current instance to a specified object or UInt64 value and returns an indication of their ...

Read More

Decimal Struct in C#

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 490 Views

The Decimal struct in C# represents a high-precision decimal floating-point number ideal for financial and monetary calculations. The Decimal value type represents decimal numbers ranging from positive 79, 228, 162, 514, 264, 337, 593, 543, 950, 335 to negative 79, 228, 162, 514, 264, 337, 593, 543, 950, 335. The default value of a Decimal is 0. The Decimal struct provides better precision than float or double for calculations where exact decimal representation is crucial, such as currency operations. Decimal vs Float Precision Comparison Decimal 0.1 + ...

Read More

Console Class in C#

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 2K+ Views

The Console class in C# is part of the System namespace and provides methods and properties for interacting with the console window. It handles standard input, output, and error streams for console applications, allowing you to control cursor position, colors, buffer size, and other console characteristics. Syntax The Console class provides static properties and methods. Here are the basic syntax patterns − Console.PropertyName = value; // Setting properties var value = Console.PropertyName; // Getting properties Console.MethodName(parameters); // Calling methods ...

Read More

Console.KeyAvailable() Property in C#

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 551 Views

The Console.KeyAvailable property in C# is used to check whether a key press is available in the input buffer without blocking the thread. It returns true if a key has been pressed and is waiting to be read, or false if no key press is pending. This property is particularly useful for creating non-blocking input operations where your program can continue executing other tasks while occasionally checking for user input. Syntax Following is the syntax for the Console.KeyAvailable property − public static bool KeyAvailable { get; } Return Value The property returns ...

Read More
Showing 6891–6900 of 21,090 articles
« Prev 1 688 689 690 691 692 2109 Next »
Advertisements