Found 2745 Articles for Csharp

C# Program to Generate Odd Numbers in Parallel using LINQ

Ankit kumar
Updated on 31-Mar-2023 15:16:16

265 Views

Introduction This article will teach you how to create a C# program that uses LINQ to generate odd numbers in parallel. Let's take a quick look at the language. The creation of desktop, online, and mobile apps generally uses the C# programming language. One of the strengths of C# is Linguistic Integrated Query, or LINQ. Data from many sources, including arrays, collections, and databases, can be rapidly accessed by developers. It provides a common syntax for data queries, regardless of the data source. As the syntax of LINQ and SQL is similar, developers can quickly understand and use them. ... Read More

C# Program to Find the Negative Double Numbers From the List of Objects Using LINQ

Ankit kumar
Updated on 31-Mar-2023 15:09:37

319 Views

Introduction In this article, we will learn how to write a C# program to find the negative double numbers from the list of objects using LINQ. Let's have a small overview of the language. The C# programming language is frequently used to develop desktop, web, and mobile apps. Working with big volumes of data can be difficult in any programming language. Finding data points that satisfy a certain set of requirements or filtering out specific values is a frequent activity when working with data. The Linguistic Integrated Query (LINQ) feature of C# can be utilised to simplify and improve ... Read More

C# Program to Find the List of Students whose Name Starts with ‘S’ using where() Method of List Collection using LINQ

Ankit kumar
Updated on 31-Mar-2023 15:07:55

244 Views

Introduction The topic to learn in this article is writing a C# Program to Find the List of Students whose Name Starts with 'S' using the where() Method of List Collection using LINQ. Language Integrated Query aka LINQ is used to generate queries in C# language. Previously we had to use other relational languages like SQL and XML. It provides more power to the C# language or any other .NET language. The syntax used to query the database in LINQ is the same as that of querying for data stored in an array. Before we proceed further and ... Read More

C# Program to estimate the size of the file using LINQ

Ankit kumar
Updated on 31-Mar-2023 16:54:59

130 Views

Introduction Let us try to understand the C# program to estimate the size of the file using LINQ. We will be understanding the LINQ (Language Integrated Query) and its methods and classes and how with their help, we will get the desired output. Language Integrated Query aka LINQ is used to generate queries in C# language. Previously we had to use other relational languages like SQL and XML. It provides more power to the C# language or any other .NET language. The syntax used to query the database in LINQ is the same as that of querying for data ... Read More

C# Program to Create File and Write to the File

Ankit kumar
Updated on 31-Mar-2023 16:53:22

4K+ Views

Introduction Creating a file and writing in it is the basics of file handling. Here, we are going to discuss a way to write a C# program to create the file and write to the file. File handling or file management in layman's terms the various processes such as making the file, reading from it, writing to it, appending it, and so on. The viewing and writing of files are the two most common operations in file management. Input and output happen due to the streams which provide a generic view of a sequence of bytes. Stream is an ... Read More

How to store/update Hashtable Elements?

Shilpa Nadkarni
Updated on 06-Jan-2023 15:14:33

1K+ Views

A hashtable is a data structure that consists of a collection of key-value pairs. The hashtable collection uses a hash function to compute the hash code of the key. A hashtable can also be defined as a non-generic collection of key-value pairs. The hash code of each key is computed using a hash function and is stored in a different bucket internally. At the time of accessing values, this hash code is matched with that of the specified key, and results are returned. Unlike other data structures like the stack, queue, ArrayList, etc. that store single values, hashtable collection stores ... Read More

How to Get Hashtable Elements as Sorted Array?

Shilpa Nadkarni
Updated on 06-Jan-2023 14:54:08

1K+ Views

A Hashtable is a non-generic collection of key-value pairs that are arranged as per the hash code of the key. A Hashtable is used to create a collection that uses a hash table for storage. The hashtable optimizes the lookup by calculating the hash code of each key and stores it internally into a basket. When we access the particular value from the hashtable, this hashcode is matched with the specified key. This hashtable collection is defined in the System.Collections namespace of C#. The class that represents the hashtable collection is the “Hashtable” class. This class provides constructors, methods, and ... Read More

How to Convert Hashtable to String?

Shilpa Nadkarni
Updated on 06-Jan-2023 14:48:49

2K+ Views

The hashtable collection in C# is a non-generic collection of elements. Each element of the hashtable is represented as a key-value pair. The keys of the hashtable are non-null and unique. The values can be duplicated and/or null. The Hashtable class of C# Systems.The collections interface is the representation of a hashtable collection. This class provides various constructors, methods, and properties to manipulate the hashtable collection. We can also convert hashtables into other collections like arrays, ArrayList, etc., and also to a string representation. In this article, let’s discuss how we can convert a hashtable collection into a string. How ... Read More

How to Convert Hashtable into an Array?

Shilpa Nadkarni
Updated on 06-Jan-2023 14:46:18

1K+ Views

The hashtable collection in C# is a non-generic collection of items represented as key-value pairs. Each key is a unique, non-null element. The value on the other hand can be duplicated and/or null. The Hashtable class in C# represents the hashtable collection. This class provides the relevant methods to create objects, alter items in the collection, etc. The hashtable collection can be expressed as an array or ArrayList in C#. In this article, let’s discuss how we can convert a hashtable collection into an array. How to Convert Hashtable into an Array? To convert the hashtable into an array, the ... Read More

C# Program to Replace Items in One Hashtable with Another Hashtable

Shilpa Nadkarni
Updated on 22-Dec-2022 17:09:54

274 Views

The hashtable collection in C# is a non-generic collection of key-value pairs that are organized based on the key’s hash code. The key is used to access the elements in the hashtable collection. Hashing helps us to efficiently retrieve data and eliminates the need for costly techniques of searching data. Hashing technique used the key itself to locate the data. This hashtable key is immutable and does not allow duplicate entries in the hashtable. The Hashtable class is defined in the System.Collections namespace provides the base class libraries for hashtable collection in C#. This Hashtable class is used to create ... Read More

Previous 1 ... 5 6 7 8 9 ... 275 Next
Advertisements