C#

In this category, you will find all C# related posts.

How to cast int to enum C#

In this post, we will learn How to cast int to enum in C# with examples. The definition of an Enum or Enumeration is “An enumeration or enum is a set of named constants of the underlying integral numeric type. To define an enumeration type, use the enum keyword and specify the names of enum members. We will also cover …

How to cast int to enum C# Read More »

Convert string to int in C#

In this post, we are going to learn how to convert string to int in C#. We will use the convert class, Parse(), TryParse() method and convert string number to int to o an equivalent 16,32,64 bit signed integer with program example. 3 methods to convert String to int in C# Using System.Convert class method …

Convert string to int in C# Read More »

Convert String to Enum in C#

In this post, we are going to learn how to Convert String to Enum in C#. Whenever we pass a string value and want to get the corresponding enum member. We will also cover how to pass a string value to enum in C#. 1. C# Enum.parse() method The enum.parse() method in the system namespace …

Convert String to Enum in C# Read More »