当前位置:网站首页>C switch nested syntax
C switch nested syntax
2022-06-25 05:53:00 【bcbobo21cn】
You can put a switch As an external switch Part of a sequence of statements , That is, it can be in a switch Use another switch sentence ;
If internal and external switch Of case Constants contain common values , There's no contradiction ;
private void button1_Click(object sender, EventArgs e)
{
char ch1, ch2;
ch1 = 'A';
ch2 = 'A';
switch (ch1)
{
case 'A':
MessageBox.Show(" It's external A!");
switch (ch2)
{
case 'A':
MessageBox.Show(" It's internal A!");
break;
case 'B': /* Inside B case Code */
break;
}
break;
case 'B': /* external B case Code */
break;
}
}Run the following ;

边栏推荐
- Timed thread pool
- Soft exam information system project manager_ Management Science (Operations Research) -- senior information system project manager of soft test 033
- Incorrect dependency of POM file
- CST8227
- Duplicate symbols for architecture i386 clang
- What is flush software? Is it safe to open an account online?
- [JS basic review] scope, this, closure
- Day19 (variable parameter, enhanced for loop traversal, generic wildcard <? >, TreeSet, linkedhashset, nested traversal of sets, set set, static import,)
- Interview experience - list of questions
- By inserting a section break, the word header, footer, and page number can start from any page
猜你喜欢

Jenkins installation and configuration
Technology Review: what is the evolution route of container technology? What imagination space is there in the future?

3.2.3 use tcpdump to observe TCP header information (supplement common knowledge of TCP protocol)
Go quiz: considerations for function naming return value from the go interview question (more than 80% of people answered wrong)
![[day40 literature extensive reading] space and time in the child's mind: metallic or atomic](/img/98/10b3e63c9609990c51b619d9ca6179.jpg)
[day40 literature extensive reading] space and time in the child's mind: metallic or atomic

Deep analysis of epoll reactor code
Websocket in the promotion of vegetable farmers
SAP ui5 application development tutorial 32 - how to create a custom SAP ui5 control

Deep analysis of recursion in quick sorting

JMeter stress testing and agent recording
随机推荐
Interface learning
Try with resource close resource flow
2022.1.21 diary
Only these four instructions are required to operate SQL data
Use of MySQL variables
The k-th node of the binary search tree [sword finger offer]
No one reads the series. Source code analysis of copyonwritearraylist
Data7202 statistical analysis
How the sap ui5 framework performs single step debugging of batch requests
Design of IM login server and message server
手机开户一般哪个证券公司好?手机开户是安全么?
Vscode voice notes to enrich information (medium)
SSRF-lab
How SAP ui5 device type detection device API works
Volatile and JMM memory models
2022.1.23 diary
Guava immutable set
What is SAP sup - Sybase unwired platform
Soft exam information system project manager_ Information system security management - Senior Information System Project Manager of soft test 026
The e-book "action guide for large organizations to further promote zero code application platform" was officially released!