switch-statement
Console.ReadKey(); and Switch statement - using letters
I\'m trying to make a program in C# that basically functions based on the key a user presses (ex. X = Quit, D = Disconnect, etc;) by using Console.ReadKey(); in c#[详细]
2023-03-26 15:01 分类:问答branching based on two boolean variables
Suppose I have two boolean variables, and I want to do completely different things based on their values. What is the cleanest way to achieve this?[详细]
2023-03-26 07:43 分类:问答while loop not working?
Can someone find why this loop isn\'t working?I\'m new to C#. while (move == \"r\" || move == \"s\" || move == \"f\")[详细]
2023-03-26 06:29 分类:问答Switch on a string skips all cases
Console.WriteLine(used+ \"\\n\"+ extracted[used]); switch (extracted[used]) { case \"*\": result = number1 * number2; break;[详细]
2023-03-26 03:39 分类:问答is there a way to switch from one app to another in C#?
Hi I have a new question for all fellow programmers to solve. Is there a way that I can press a button or have a timer on that will fire an event that will make my app switch from one app to another?f[详细]
2023-03-26 02:42 分类:问答I declare a variable in C# and cannot use it inside of the switch statement
Consider this C# code: string gr = comboBox1.ValueMember; decimal sum; try { decimal rite = Convert.ToDecimal(textBox1.Text);[详细]
2023-03-25 16:53 分类:问答write a C construct
Is there a way (in C) to write a construct like the switch statement, but for strings? Is there a way to write a C construct at all in C?[详细]
2023-03-25 10:19 分类:问答Java 7 String switch decompiled: unexpected instruction
I have decompiled a very simple class that uses the new Java 7 String Switch feature. The class: public class StringSwitch {[详细]
2023-03-25 08:38 分类:问答programmatically get the value of the constant in a case statement
I need a way to know the value of the constant used in the case statement. Is this possible? For example[详细]
2023-03-24 13:59 分类:问答Only 1 case is working in switch statement (Objective C)
I am working in Xcode on a synthesizer application. I am using custom sliders and knobs. I want these to send control values to receivers in an embedded Pure Data patch (I am using libpd as a Pure Dat[详细]
2023-03-24 12:52 分类:问答