Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
String to keycode and switch check
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using System.Windows.Forms; namespace Rextester { public class Program { public static void Main(string[] args) { //Your code goes here Console.WriteLine("Keys to code:"); Console.WriteLine("+ = " + (int)'+'); Console.WriteLine("- = " + (int)'-'); Console.WriteLine("/ = " + (int)'/'); Console.WriteLine("* = " + (int)'*'); Console.WriteLine("---------------"); var actionCode = "-".First(); switch((int)actionCode) { case 45: Console.WriteLine("Dit is min"); break; case 43: Console.WriteLine("Dit is plus"); break; default: Console.WriteLine("Onbekend"); break; } } } }
run
|
edit
|
history
|
help
0
condicional "?"
N
Download a UTF-8 text file, and display the contents.
bbbbbb
functional program
Test
csharp enum
Practicando C#
Tarkov Time
Product, Category, Composition and Inheritance