Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
enum extension
using System; namespace Rextester { public enum State : int { StateA = 1, StateB } public enum DifferentState : int { StateA = 1, StateB } public static class Extensions { public static bool CompareInt(this Enum lhs, int rhs) { return Convert.ToInt32(lhs) == rhs; } } public class Program { public static void Main(string[] args) { State foo = State.StateA; Console.WriteLine(foo.CompareInt(1)); Console.WriteLine(foo.CompareInt(2)); DifferentState bar = DifferentState.StateB; Console.WriteLine(bar.CompareInt(1)); Console.WriteLine(bar.CompareInt(2)); } } }
run
|
edit
|
history
|
help
0
Root
ö1
olution to problem #2 from projecteuler.net
FREE V-BUCKS GENERATOR NO HUMAN VERIFICATION 2022 [zT4]
Binary search tree - Post-order Traversal
Odd and Even Product
1
147
asxdf
C# Bubble Sort