当前位置:网站首页>C# break continue return 三者区别
C# break continue return 三者区别
2022-06-12 09:52:00 【喝口我的爽肤水】
break:执行break操作,跳出所在的当前整个循环,到外层代码继续执行。通常,是离当前break最近的一个函数体的循环会被跳出。即一次只能结束一种循环
continue:执行continue操作,跳出本次循环,从下一个迭代继续运行循环,内层循环执行完毕,外层代码继续运行。字段后面不需要跟着参数。即结束的是本次循环,并将接着开始下一次循环。
return:执行return操作,直接返回函数,所有该函数体内的代码(包括循环体)都不会再执行。在需要返回值的情况下,后需要紧跟一个返回值,用于提供给对应方法所需的返回值。即同时结束其所在的循环和其外层循环。
边栏推荐
- Test case and bug description specification reference
- JVM virtual machine
- 7-5 哲哲打游戏
- List、Set、Map的区别
- NiO principle
- The Dragon Boat Festival is in good health -- people are becoming more and more important in my heart
- Summary of APP test interview questions, which must be taken in the interview
- 【云原生】具体指什么呢---此文和大伙儿分享答案
- QQ,微信能聊天都靠它(socket)?
- 005:数据湖与数据仓库的区别
猜你喜欢

NiO principle

Clickhouse column basic data type description
Automated test learning path, come and learn

Do you know the meaning behind these questions?
![[preview of the open class of Jishu] arm's strongest MCU core cortex-m85 processor helps the innovation of the Internet of things in an all-round way (there is a lottery)](/img/25/c3af3f51c04865820e3bbe2f010098.png)
[preview of the open class of Jishu] arm's strongest MCU core cortex-m85 processor helps the innovation of the Internet of things in an all-round way (there is a lottery)

基于SSM实现水果商城批发平台

004:aws data Lake solution

III Regular expression to finite state automata: NFA to DFA

【云原生】具体指什么呢---此文和大伙儿分享答案

Ceph如何改善存储性能以及提升存储稳定性
随机推荐
C # getting started series (12) -- string
High quality and good books help guide apes and recommend "good summer books" with the four major publishers
Golandidea 2020.01 cracked version
[cloud native] what exactly does it mean? This article shares the answer with you
哈希表的线性探测法代码实现
7-13 underground maze exploration (adjacency table)
Chained hash table
ThreadLocal
2022 pole technology communication - the dispute over anmou technology is settled, and the cornerstone of the local semiconductor industry is more stable
DNA数字信息存储的研究进展
005: difference between data lake and data warehouse
Storage R & D Engineer Recruitment
优质好书助成长 猿辅导携四大出版社推荐“暑期好书”
【clickhouse专栏】基础数据类型说明
Auto.js学习笔记7:js文件调用另一个js文件里的函数和变量,解决调用失败的各种问题
价值投资.
gnu-efi开发环境设置
Database common interview questions are ready for you
002:数据湖有哪些特征
《真北》读书笔记