12421 3
How to convert byte[] array to string and Vice versa in C#?

Hello, I would like to know how to convert byte[] array to string and string to byte[] array in C#, using the best possible method, I know there are several links and methods available on the internet but I would like to know best and easy method for this, thanks.

...
Type
Question
12412 3
Convert string of "dd/MM/yyyy" format into Datetime using C#?

I am using the code below to convert my string which is in the format "dd/MM/yyyy" into datetime

...
Type
Question
12348 2
how to implement switch case in Razor (.cshtml)?

I need to implement switch case in Razor C# page as if-else would not be a good idea, because it will create too many conditions, so i thought to create Switch case instead, here is my current code, but it throwing syntax error

...
Type
Question
12280 3
Multiple actions were found that match the request: in web api C# ?

HI, I am trying to work with the Web API in C#, and when calling it using jquery I am getting the error "Multiple actions were found that match the request: in web API C#", so how to resolve this issue, here is my current code

...
Type
Question
12263 1
Error : An asynchronous operation cannot be started at this time

When I am trying to call async method in Class from controller, I am getting the error as below

An asynchronous operation cannot be started at this time. Asynchronous operations may only be started within an asynchronous handler or module or during certain events in the Page lifecycle. If this exception occurred while executing a Page, ensure that the Page is marked <%@ Page Async="true" %>

How can I resolve this error, here is my Current code

...
Type
Question


12218 2
How to find and extract only number from string in C#?

I have a string with numbers in it, for example here is the string "121 testing your City", now, I would like to extract only "121" from the string, how can I do that using C#?

...
Type
Question
12190 0
Hello World Visual Studio Code C# Example
In this article, I have provided step by step procedure to create hello world program in C# using Visual Studio Code and how to create new console project in it.
Type
Article
12121 0
How to convert string to int in C#?
In this article, I will provide you quick and easy ways to convert string to int using int.parse and int.tryparse with explaining the difference between these two.
Type
Article
11902 2
C# error "Type 'string' does not contain a definition for 'equals' and no extension method 'equals' of type 'string' could be found."

Hi please I'm converting 12-hour AM/PM format, to military 24-hour time format using C# Console app.

Note: Midnight is 12:00:00AM on a 12-hour clock, and 00:00:00 on a 24-hour clock. Noon is 12:00:00PM on a 12-hour clock, and 12:00:00 on a 24-hour clock.

My code is that :

...
Type
Question
11702 0
Converting String to Enum OR Enum to String in C#
In this article, I have explained with a console application example, how you can convert string to enum in C# OR Enum to string
Type
Article

Page 5 of 24