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
Funzpoint
30272 Program Ex7_1 switch_int
SortedDictionary : Add と foreach
RomaSlot2
Fórum ➡ DataTable #1's rows that are NOT present in DataTable #2 ♦
30272 Program Ex6_1 else_if
Hello
Math 5.83
Math 9.4
C# program to Determine if Two Words Are Anagrams of Each Other