Articles on Trending Technologies

Technical articles with clear explanations and examples

Int64.ToString() Method in C#

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 598 Views

The Int64.ToString() method in C# is used to convert a 64-bit integer (long) value to its equivalent string representation. This method provides multiple overloads for different formatting options, allowing you to control how the numeric value appears as text. Syntax Following are the primary syntax overloads for the Int64.ToString() method − public override string ToString(); public string ToString(string format); public string ToString(IFormatProvider provider); public string ToString(string format, IFormatProvider provider); Parameters format − A numeric format string that specifies how the value should be formatted (optional). provider − An object that supplies culture-specific ...

Read More

Adding new node or value at the end of LinkedList in C#

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 341 Views

The LinkedList class in C# provides the AddLast() method to add new nodes or values at the end of the linked list. This method maintains the sequential order and automatically updates the internal node structure. Syntax Following is the syntax for adding elements at the end of a LinkedList − LinkedList list = new LinkedList(); list.AddLast(value); The AddLast() method has two overloads − public LinkedListNode AddLast(T value) public void AddLast(LinkedListNode node) Parameters value − The value to add at the end of the LinkedList. node − The LinkedListNode ...

Read More

What is explicit implementation and when to use in the interface in C#?

Nizamuddin Siddiqui
Nizamuddin Siddiqui
Updated on 17-Mar-2026 476 Views

Explicit interface implementation in C# allows a class to implement interface members in a way that they can only be accessed through the interface reference, not through the class instance directly. This is particularly useful when a class implements multiple interfaces that have members with the same signature. Syntax Following is the syntax for explicit interface implementation − interface IInterface1 { void Method(); } class MyClass : IInterface1 { void IInterface1.Method() { // explicit implementation } } Note ...

Read More

C# Program to Remove Duplicates from an Array

AYUSH MISHRA
AYUSH MISHRA
Updated on 17-Mar-2026 7K+ Views

In this article, we will explore how to remove duplicate elements from an array in C# using different approaches. Removing duplicates is a common programming task that helps maintain data integrity and optimize storage. What are Duplicate Elements in an Array? Duplicate elements are values that appear more than once in an array. When removing duplicates, we keep only one occurrence of each unique value, creating a new array with distinct elements. Examples Input: array = {1, 1, 2, 3, 3, 4, 4, 4, 5, 5, 6, 6} Output: array = {1, 2, 3, 4, ...

Read More

How to change the WindowLeft of the Console

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 228 Views

The Console.WindowLeft property in C# gets or sets the leftmost position of the console window area relative to the screen buffer. This property controls the horizontal scrolling position of the console window within the buffer. Syntax Following is the syntax for using the Console.WindowLeft property − Console.WindowLeft = value; int leftPosition = Console.WindowLeft; Parameters The WindowLeft property accepts an int value representing the column position (0-based) where the left edge of the console window should be positioned within the screen buffer. Key Rules The value must be greater than ...

Read More

Check if HybridDictionary has fixed size in C#

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 217 Views

The HybridDictionary class in C# is a specialized collection that combines the performance benefits of both ListDictionary and Hashtable. To check if a HybridDictionary has a fixed size, you can use the IsFixedSize property, which returns false for standard HybridDictionary instances since they are dynamically resizable. Syntax Following is the syntax for checking if a HybridDictionary has a fixed size − bool isFixed = hybridDictionary.IsFixedSize; HybridDictionary Properties The HybridDictionary class provides several properties to check its characteristics − IsFixedSize − Returns true if the dictionary has a fixed size; otherwise, false ...

Read More

What is the difference between Finalize and Dispose in C#?

Nizamuddin Siddiqui
Nizamuddin Siddiqui
Updated on 17-Mar-2026 3K+ Views

The Finalize and Dispose methods in C# are both used for cleaning up resources, but they work differently and serve distinct purposes in memory management. Understanding their differences is crucial for proper resource management in .NET applications. Finalize Method The Finalize() method is called automatically by the Garbage Collector before an object eligible for collection is reclaimed. The Garbage Collector takes responsibility for deallocating memory for unreferenced objects. This method is called at some point after there are no longer valid references to that object in memory. The framework does not guarantee when this will happen. While ...

Read More

How to populate XDocument from String in C#?

Nizamuddin Siddiqui
Nizamuddin Siddiqui
Updated on 17-Mar-2026 2K+ Views

XML is a self-describing language that provides data along with rules to identify what information it contains. The XDocument class in C# contains all the information necessary for a valid XML document, including XML declarations, processing instructions, and comments. The XDocument class is available in the System.Xml.Linq namespace and derives from XContainer, allowing it to contain child nodes. However, XDocument objects can have only one child XElement node, reflecting the XML standard that permits only one root element per document. Syntax Following is the syntax to populate XDocument from a string using XDocument.Parse() − XDocument ...

Read More

What is Facade and how to implement in C#?

Nizamuddin Siddiqui
Nizamuddin Siddiqui
Updated on 17-Mar-2026 287 Views

The Facade design pattern provides a simplified interface to a complex subsystem. It acts as a wrapper that hides the complexity of multiple classes and their interactions behind a single, easy-to-use interface. This pattern is particularly useful when working with complex APIs, legacy systems, or when you need to provide a unified interface to a set of interfaces in a subsystem. Key Components The Facade pattern consists of the following components − Facade: The main interface that clients interact with. It delegates requests to appropriate subsystem objects. Subsystems: The complex classes that ...

Read More

UInt32.CompareTo() Method in C# with Examples

AmitDiwan
AmitDiwan
Updated on 17-Mar-2026 481 Views

The UInt32.CompareTo() method in C# is used to compare the current instance to a specified object or UInt32 and returns an indication of their relative values. This method is essential for sorting operations and determining the ordering relationship between unsigned 32-bit integers. Syntax The UInt32.CompareTo() method has two overloads − public int CompareTo(object value); public int CompareTo(uint value); Parameters value (object) − An object to compare, or null. value (uint) − An unsigned integer to compare. Return Value The method returns an int that indicates the relative order of ...

Read More
Showing 10031–10040 of 61,299 articles
Advertisements