C# code examples · runnable

20 runnable C# code examples.

Open any C# example to explore the code and run it online. No setup, no signup.

C#

How to loop through an enum in C#How to convert an int to an enum in C#How to check if a string contains a substring in C#How to iterate over a dictionary in C#How to deep clone an object in C#How to catch multiple exceptions in C#How to generate a random number in a range in C#How to calculate the difference between two dates in C#How to check for null in C#How to sort a list of objects by property in C#How to convert a byte array to a hex string in C#How to convert a string to a byte array in C#How to convert a string to an enum in C#How to remove duplicates from a list in C#How to loop with an index in C#How to group by with LINQ in C#How to convert an object to JSON in C#How to parse JSON into an object in C#How to convert a string to an int in C#How to join a list into a string in C#
Questions & answers

Examples, explained

Yes. Open any C# example to edit and run its code on the CompileBytes engine without installing anything.