简体   繁体   中英

Conditional Order of Operations in C#

So I was recently going through the tutorial for Python on CodeAcademy and I came across this part.

在此处输入图片说明

Where it instructs that Python has a set order in which it evaluates conditionals. I had never heard of anything like this before. I'm used to coding in C# and was wondering if C# has this same type of logic and what the ordering is for it.

Thanks in advance!

It is the order of precedence. In fact many languages have such rules implemented not just python.

The one that you are looking for can be found in Microsoft MSDN Here is the link

  1. Operators are listed in descending order of precedence. If several operators appear on the same line or in a group, they have equal precedence.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM