AmitDiwan

AmitDiwan

8,392 Articles Published

Articles by AmitDiwan

Page 219 of 840

UInt64.ToString() Method in C# with Examples

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 552 Views

The UInt64.ToString() method in C# is used to convert the numeric value of the current UInt64 instance to its equivalent string representation. This method is particularly useful when you need to display UInt64 values as text or perform string operations on numeric data. Syntax Following is the syntax for the parameterless overload − public override string ToString(); The method also has additional overloads for custom formatting − public string ToString(string format); public string ToString(IFormatProvider provider); public string ToString(string format, IFormatProvider provider); Return Value Returns a string that represents the ...

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

DateTime.GetTypeCode() Method in C#

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 129 Views

The DateTime.GetTypeCode() method in C# is used to return the TypeCode for the DateTime value type. The returned value is the enumerated constant TypeCode.DateTime. This method is inherited from the IConvertible interface and is primarily used in scenarios where you need to determine the type code of a DateTime object programmatically, such as in reflection or type conversion operations. Syntax Following is the syntax − public TypeCode GetTypeCode(); Return Value The method returns TypeCode.DateTime, which is an enumerated constant that represents the DateTime type. Using GetTypeCode() with Current DateTime The ...

Read More

Uri.CheckHostName(String) Method in C#

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 485 Views

The Uri.CheckHostName() method in C# is used to determine the type of hostname specified in a string. It validates whether the given string represents a valid DNS name, IPv4 address, IPv6 address, or an unknown format. Syntax Following is the syntax − public static UriHostNameType CheckHostName(string hostName); Parameters hostName − A string that contains the hostname to validate. Return Value The method returns a UriHostNameType enumeration value that indicates the type of the hostname − UriHostNameType Description Dns Valid ...

Read More

Uri.CheckSchemeName(String) Method in C#

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 204 Views

The Uri.CheckSchemeName() method in C# is used to determine whether the specified scheme name is valid. A valid scheme name must start with a letter and can contain only letters, digits, plus (+), period (.), or hyphen (-) characters. Syntax Following is the syntax − public static bool CheckSchemeName(string schemeName); Parameters schemeName − The scheme name to validate as a string. Return Value Returns true if the scheme name is valid; otherwise, false. Valid vs Invalid Scheme Names Valid ...

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

DateTime.IsDaylightSavingTime() Method in C#

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 464 Views

The DateTime.IsDaylightSavingTime() method in C# determines whether a specific DateTime instance falls within the daylight saving time range for the current time zone. This method returns true if the date and time are within the DST period, and false otherwise. This method is particularly useful when working with time-sensitive applications that need to account for seasonal time changes in different regions. Syntax Following is the syntax for the DateTime.IsDaylightSavingTime() method − public bool IsDaylightSavingTime(); Return Value The method returns a bool value − true − if the DateTime instance is ...

Read More

Uri.Equals(Object) Method in C#

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 162 Views

The Uri.Equals(Object) method in C# compares two Uri instances for equality. This method performs a case-sensitive comparison of the complete URI strings, including scheme, host, port, path, query, and fragment components. Syntax Following is the syntax − public override bool Equals(object comparand); Parameters comparand − The Uri instance or object to compare with the current instance. Can be null. Return Value Returns true if the specified object is a Uri instance equivalent to the current Uri instance; otherwise, false. If the comparand is null or not a Uri object, the method ...

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

DateTime.IsLeapYear() Method in C#

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

The DateTime.IsLeapYear() method in C# is used to determine whether a specified year is a leap year. This static method returns true if the year is a leap year, and false otherwise. A leap year occurs every 4 years, with exceptions for century years that are not divisible by 400. Syntax Following is the syntax − public static bool IsLeapYear(int year); Parameters year − An integer representing the year to be checked. The year must be between 1 and 9999. Return Value Returns a bool value − ...

Read More
Showing 2181–2190 of 8,392 articles
« Prev 1 217 218 219 220 221 840 Next »
Advertisements