Server Side Programming Articles

Page 849 of 2109

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

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 589 Views

The Char.IsControl(String, Int32) method in C# determines whether the character at a specified position in a string is a control character. Control characters are non-printable characters used for formatting and text control, such as tab (\t), newline (), and carriage return (\r). Syntax Following is the syntax for the Char.IsControl(String, Int32) method − public static bool IsControl(string str, int index); Parameters str − The string to examine. index − The zero-based position of the character to evaluate in the string. Return Value Returns true if ...

Read More

Char.IsSymbol() Method in C#

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 679 Views

The Char.IsSymbol() method in C# determines whether a specified character is categorized as a symbol character. Symbol characters include mathematical symbols, currency symbols, and other non-alphanumeric characters that are not punctuation or control characters. Syntax The method has two overloads − public static bool IsSymbol(char c); public static bool IsSymbol(string str, int index); Parameters c − The Unicode character to evaluate. str − A string containing the character to evaluate. index − The position of the character to evaluate in the string. Return Value Returns true if the character ...

Read More

CharEnumerator.Clone() Method in C#

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 145 Views

The CharEnumerator.Clone() method in C# is used to create a copy of the current CharEnumerator object. This method returns an object that must be cast to CharEnumerator to use its functionality. The cloned enumerator maintains the same position as the original enumerator at the time of cloning. Syntax public object Clone(); Return Value Returns an object that is a copy of the current CharEnumerator instance. The returned object must be cast to CharEnumerator to access enumerator-specific methods. Using CharEnumerator.Clone() The following example demonstrates how to create and use a cloned CharEnumerator − ...

Read More

CharEnumerator.Dispose() Method in C#

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 166 Views

The CharEnumerator.Dispose() method in C# is used to release all resources used by the current instance of the CharEnumerator class. This method implements the IDisposable interface and should be called when you're finished using the enumerator to ensure proper resource cleanup. Syntax Following is the syntax for the CharEnumerator.Dispose() method − public void Dispose(); Parameters This method does not take any parameters. Return Value This method does not return any value (void). Using CharEnumerator.Dispose() Method Example 1: Basic Usage The following example demonstrates how to use the Dispose() ...

Read More

Dictionary.Clear Method in C#

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

The Dictionary.Clear() method in C# removes all key/value pairs from the Dictionary. This method is useful when you need to empty a dictionary completely while keeping the dictionary object itself for future use. Syntax public void Clear(); Parameters The Clear() method takes no parameters. Return Value The Clear() method does not return any value. It has a void return type. Dictionary.Clear() Operation Before Clear() Key1: Value1 Key2: Value2 Key3: Value3 ...

Read More

Char.IsWhiteSpace() Method in C#

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 578 Views

The Char.IsWhiteSpace() method in C# is used to determine whether a specified Unicode character is classified as white space. This includes spaces, tabs, line feeds, carriage returns, and other Unicode whitespace characters. Syntax Following is the syntax for the Char.IsWhiteSpace() method − public static bool IsWhiteSpace(char ch); Parameters ch − The Unicode character to evaluate. Return Value Returns true if the character is a whitespace character; otherwise, false. Char.IsWhiteSpace() Method Input char ch ...

Read More

Math.Exp() Method in C#

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 357 Views

The Math.Exp() method in C# returns e (Euler's number, approximately 2.718) raised to the specified power. This method is commonly used in mathematical calculations involving exponential functions, growth calculations, and scientific computations. Syntax Following is the syntax for the Math.Exp() method − public static double Exp(double d) Parameters d − A double-precision floating-point number representing the power to which e is raised. Return Value Returns a double value representing ed. Special cases include: If d equals Double.NaN, the method returns NaN. If ...

Read More

Math.Floor() Method in C#

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

The Math.Floor() method in C# returns the largest integral value that is less than or equal to the specified number. It rounds down to the nearest integer, which is particularly important to understand when working with negative numbers. Syntax The Math.Floor() method has two overloads − public static decimal Floor(decimal val); public static double Floor(double val); Parameters val − A decimal or double number to be rounded down to the nearest integer. Return Value Returns the largest integer less than or equal to val. The return type ...

Read More

Type.Equals() Method in C#

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 941 Views

The Type.Equals() method in C# determines if the underlying system type of the current Type is the same as the underlying system type of the specified Object or Type. This method is essential for type comparison operations in reflection scenarios. Syntax The Type.Equals() method has two overloads − public virtual bool Equals(Type o); public override bool Equals(object o); Parameters o − The object or Type whose underlying system type is to be compared with the underlying system type of the current Type. Return Value Returns true if ...

Read More

Type.GetArrayRank() Method in C#

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 144 Views

The Type.GetArrayRank() method in C# returns the number of dimensions in an array type. This method is useful when working with multidimensional arrays and you need to determine how many dimensions the array has at runtime. The method works only with array types. If called on a non-array type, it throws an ArgumentException. Syntax Following is the syntax for the GetArrayRank() method − public virtual int GetArrayRank(); Return Value The method returns an int representing the number of dimensions in the array. For example, a single-dimensional array returns 1, a two-dimensional array ...

Read More
Showing 8481–8490 of 21,090 articles
« Prev 1 847 848 849 850 851 2109 Next »
Advertisements