Topics
Csharp
About this topic: Articles tagged __TAG__
Showing 448 articlesRelated tags
Topics
Articles
Showing 448 articles
How-tos
How to Count Occurrences of a Character Inside a String in C#
There are 3 main methods that can be used to calculate the number of occurrences of a character inside a string variable in C#, the linq method, the String.Split() function and the …
↗
How-tos
How to Compare Two Lists in C#
There are 2 main methods that can be used to compare 2 lists for differences in C#, the Linq method and the List.Contains() functions.
↗
How-tos
How to Slice An Array in C#
There are 3 main methods that can be used to slice an array in C#, the Linq method, the ArraySegment class, and the extension function method.
↗
How-tos
How to Print Array in C#
There are 3 main methods that can be used to print an array of strings in C#, the String.Join() method, the ForEach() function, and the foreach loop method.
↗
How-tos
How to Iterate Through a List in C#
There are 3 main methods that can be used to iterate through a list in C#, the for loop, the foreach loop, and the Lambda expressions.
↗
How-tos
How to Generate Random Alphanumeric Strings in C#
There are 3 main methods that can be used to generate random alphanumeric strings in C#, the Random class, the LINQ method, and the RNGCryptoServiceProvider class.
↗
How-tos
How to Exit Console Application in C#
This article shows several methods that can be used to exit a console application in C#.
↗
How-tos
How to Add String to an Array in C#
There is no built-in method to dynamically add new elements to a completely filled array in C#.
↗
How-tos
Final Keyword in C#
There are 2 different keywords in C# that are equivalent to the final keyword in Java, the sealed keyword for classes and functions, and the readonly keyword for the fields.
↗
How-tos
How to Get File Size in C#
The FileInfo.Length property can be used to get the size of a file in C#.
↗
How-tos
How to Download Image in C#
There are 3 main methods that can be used to download an image in C#, the WebClient.DownloadFile() function, the Bitmap class, and the Image.FromStream() function.
↗
How-tos
How to Create DataTable in C#
The DataTable class can be used to create a data table in C#.
↗
How-tos
How to Convert Object to Int in C#
There are 3 main methods that can be used to convert an object to an integer variable in C#, the typecasting method, the int.Parse() function, and the Convert.ToInt32() function.
↗
How-tos
How to Convert Int to Hex in C#
The ToString() function can be used to convert an integer value to a hexadecimal string and the Convert.ToInt32() function can be used to convert a hexadecimal string to an integer …
↗
How-tos
How to Initialize a List of Tuples in C#
This article explores several approaches to efficiently initialize a list of tuples in C#.
↗
How-tos
Abstract Function vs Virtual Function in C#
An abstract function does not provide any definition of itself, while a virtual function has a default definition in C#.
↗
How-tos
Thread vs Task in C#
The Thread class creates an actual OS thread while the Task class creates a task that asynchronously executes in the thread pool.
↗
How-tos
How to Write to the Output Window in C#
There are 3 main methods that can be used to write to the debug window of the Microsoft Visual Studio IDE in C#, the Debug.Write(), the Debug.WriteLine(), and the Debug.Print() …
↗
How-tos
How to Wait for a Thread to Finish in C#
There are two main methods to wait for the completion of threads in C#, the Task.WaitAll() and the Thread.Join() functions.
↗
How-tos
How to Remove First Character From String in C#
There are two main methods that can be used to remove the first character from a string in C#, the String.Remove() method and the String.Substring() method. We can also achieve the …
↗
How-tos
How to Pass Object by Reference in C#
By default, all the value type variables are passed by value and all the reference type variables are passed by reference to a function in C#.
↗
How-tos
How to Keep Console Open in C#
There are 4 main methods that can be used to keep the console of visual studio IDE open in C#, the Console.ReadLine() method, the Console.Read() method, the Console.ReadKey() …
↗
How-tos
How to Get All File Names in a Directory in C#
There are two main methods that can be used to get the file names of all the files inside a directory in C#, the Directory.GetFiles() function and the DirectoryInfo.GetFiles() …
↗
How-tos
How to Format a String to Currency in C#
There are two main methods that can be used to format a string to currency format in C#, the String.Format() and the ToString() functions.
↗
No articles found
Try clearing the filters.