C# List Contains with Examples

How to use the List Contains method in C# In this tutorial, you will learn how to use C# List Contains method to check whether a given element exists. The Contains method is used to check for the presence of a specified element. The method returns true if the element matches the element specified in … Read more

C# typeof with Examples

The difference between typeof and is operator in C# In this tutorial, you will learn the difference between typeof and is operator in C#. C# classes have a mechanism called inheritance. This allows new derived classes to be created by inheriting from a base class. The derived class can be upcast to function as the base class or downcast … Read more

C# TryParse (int, double, float) with Examples

Use the C# TryParse method to see if you can convert a string to a number. In string processing, it is often desired to convert a string of written numbers into an int or long type that can perform numerical operations. Converting a numeric value to a string is not a problem, but the reverse … Read more

C# Data Types

What is a type? When a variable is declared in C#, it is allocated an area in memory. The type of a variable depends on the type of the value to be assigned.  Programmers should be aware of the difference between the types of variables since not putting a value in the proper type will … Read more

C# Variables

What are variables in C#? There is always something called a variable in any programming language, not just C#. In this tutorial, I will briefly describe such variables. What is a variable? A variable is a box for temporarily storing a value. When you were a student, you may have learned that x = 1, … Read more

C# IndexOf() – List, Array, ArrayList, String

Check for the presence of a given element in an array or collection and return its index This tutorial explains how to check whether an array, string, or collection contains an element that matches a specified value and determines its index. You can use the IndexOf method to search for elements in an array or … Read more

C# List Initialization

How to initialize a List<T> in C# In this tutorial, you will learn how to initialize a list in C#. We will show you examples of creating an empty list and a list with initial values. See also: Remove duplicates from a list in C# Initialize a list in C# Creating an empty list To … Read more

C# Remove Last Character from String

How to remove the last character from a string in C# This tutorial explains how to remove the last character from a string in C#. Related tutorials: How to remove the first character from String in C# How to remove the last character from a string using Remove() The Remove method can be used to … Read more

C# Remove First Character from String

How to remove the first character from a string in C# In this tutorial, you will learn how to remove the first character from a string in C#. We will show you how to remove the first character in a string using three different ways. Removing the first character using the Replace method To remove … Read more

C# Remove String from String

How to Remove a substring from a string in C# This tutorial explains how to remove a string from a string in C#. This tutorial will show you three different ways to remove substrings from a string. Learn also: Substring in C# C# String Contains Removing a string from a string with the string Replace … Read more

C# Remove a Character from String

How to remove a character from a string in C# In this tutorial, you will learn how to remove a character from a string in C#. More tutorials: Substring in C# Remove spaces in C# Removing a character from a string with the string Replace() method To replace each character in a string, use the … Read more

C# Trim with Examples

Removing whitespace from a string with C# Trim This tutorial shows you how to remove leading and trailing whitespace in a string using the string Trim method in C#. More C# tutorials: C# String Contains C# String Length Removing leading and trailing whitespace with the string Trim() method Syntax: string.Trim() Removes leading and trailing spaces … Read more

C# Substring with Examples

How to get a substring from a string in C# The C# Substring method is a method of the String class used to extract a specified string from a string. Learn more: C# String Length The Substring method is defined as follows: The length argument specifies the number of characters to extract. The Substring argument … Read more

C# ArrayList with Examples

How to use ArrayList in C#? In this article, you will learn how to use ArrayList in C#. ArrayList is a collection of variable-length arrays. I will show you how to initialize, add, delete, sort, and remove duplicates. Learn more: What is a List in C#? How to use Array in C# ArrayList initialization This … Read more

C# HashSet with Example

How to use HashSet in C# What is HashSet in C#? C# has a list class to which duplicate items cannot be added. This class is called “HashSet” and is very useful in some cases. Since it can be used in the same way as the regular List class, it is well worth mastering. Learn … Read more

C# String Contains Substring

Checking for the presence of the specified substring in the string In this tutorial, you will learn how to use the C# string Contains method. The string Contains method checks whether a substring is contained in a string. If the substring is included, true is returned. In string manipulation, there are often situations where you … Read more

4 Differences between C and C++

C vs. C++: Introduce the four differences between C and C++ This article explains the four differences between C and C++. C language C is a compiled general-purpose programming language. Released in 1972, it is an old programming language that requires source code to be compiled for program execution. C is characterized by its high … Read more

Difference between C# and C++

C# vs. C++: Explanation of the characteristics and technical differences between C# and C++ Despite their similar names, C# and C++ are completely different languages. Although there is a slight technical connection between the two languages, they have different areas of expertise.  If you are thinking of learning one of the languages in the future, … Read more

What is C#?

What is C# programming? C# is a programming language developed by Microsoft. It has attracted attention because it is the core programming language of Microsoft. C# is a technical point of view, a kind of evolution C++ and, at the same time, it is a language highly influenced by Java. The key question here is … Read more

C# Dictionary foreach with Examples

How to iterate through a Dictionary in C# with foreach This tutorial explains how to iterate over a Dictionary in C# using the foreach statement. The foreach statement can be used to iterate over key and value, only key, only value, etc. You can also get the index in the iteration process. If you are … Read more