{"id":279625,"date":"2016-05-05T13:05:03","date_gmt":"2016-05-05T09:05:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=279625"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=279625","title":{"rendered":"\u041f\u043e\u0438\u0441\u043a \u043e\u0448\u0438\u0431\u043e\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439"},"content":{"rendered":"<p>       \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0442\u043e\u0447\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430. \u042d\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u043e\u0448\u0438\u0431\u043e\u043a. \u041c\u044b \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0442\u0430\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438, \u043e \u043d\u0438\u0445 \u0438 \u0431\u0443\u0434\u0435\u0442 \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/e53\/3a5\/dca\/e533a5dcae7c615fa543e2ba68c25783.png\" align=\"left\"\/><br \/>  <a name=\"habracut\"><\/a><br \/>  \u0415\u0441\u043b\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0443\u043c\u0435\u0435\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c, \u0447\u0435\u043c\u0443 \u0440\u0430\u0432\u043d\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0433\u043b\u0443\u0431\u043e\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u043a\u043e\u0434\u0430 \u0438 \u0432\u044b\u044f\u0432\u043b\u044f\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0448\u0438\u0431\u043e\u043a. \u0420\u0435\u0447\u044c \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0438\u0434\u0451\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043e \u0442\u043e\u0447\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a 1+2, \u043d\u043e \u0438 \u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u0412 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0435 <a href=\"http:\/\/www.viva64.com\/ru\/pvs-studio\/\">PVS-Studio<\/a> \u043c\u044b \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0435 \u0437\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043e\u0432 \u2014 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u0422\u0430\u043a\u043e\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0435\u0441\u0442\u044c \u043a\u0430\u043a \u0432 \u044f\u0434\u0440\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 C\/C++ \u043a\u043e\u0434\u0430, \u0442\u0430\u043a \u0438 \u0432 \u044f\u0434\u0440\u0435 C#-\u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 C#-\u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430. <\/p>\n<p>  \u0412 \u0441\u0432\u043e\u0451\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0435 PVS-Studio \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 C# \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <a href=\"https:\/\/github.com\/dotnet\/roslyn\">Roslyn<\/a> \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u0431 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435. Roslyn \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e, \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0442\u0438\u043f\u0430\u0445, \u043f\u043e\u0438\u0441\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 PVS-Studio \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043e\u0431\u0445\u043e\u0434 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0435\u0440\u0435\u0432\u0430 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438 \u043a \u0435\u0433\u043e \u0443\u0437\u043b\u0430\u043c. \u041f\u043e\u043c\u0438\u043c\u043e \u044d\u0442\u043e\u0433\u043e, \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0431\u0445\u043e\u0434\u0430 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u0437\u0436\u0435. \u041f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0442\u0430\u043a\u043e\u0439 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439<\/h2>\n<p>  \u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u0435\u0439, \u0441\u0432\u043e\u0439\u0441\u0442\u0432, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0438 \u0432 \u043a\u043e\u0434\u0435. \u0415\u0441\u043b\u0438 \u043f\u0435\u0440\u0432\u043e\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0435 \u2014 \u044d\u0442\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0438\u043b\u0438 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435, \u0442\u043e \u043c\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0443\u0442\u0451\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441\u043f\u0440\u0430\u0432\u0430 \u043e\u0442 \u0437\u043d\u0430\u043a\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u0430. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0437\u043d\u0430\u0435\u043c \u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435\/\u043f\u043e\u043b\u0435\/\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 \u0438 \u0441\u0447\u0438\u0442\u0430\u0435\u043c, \u0447\u0442\u043e \u043e\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<pre><code class=\"cpp\">public class MyClass {     private bool hasElements = false;     public void Func(byte x, List&lt;int&gt; list)     {         int y = x;         hasElements = (list.Count &gt;= 0);         if (hasElements &amp;&amp; y &gt;= 0) \/\/V3022         {         }     } }<\/code><\/pre>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0431\u0445\u043e\u0434\u0430 \u0434\u0435\u0440\u0435\u0432\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0434\u043e\u0439\u0434\u0451\u0442 \u0434\u043e \u0442\u0435\u043b\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>Func<\/i>, \u043e\u043d \u043d\u0430\u0447\u043d\u0451\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <i>y<\/i>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <i>\u0445<\/i>. \u0422\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u043e <i>x<\/i> \u043c\u044b \u0437\u043d\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e \u0447\u0442\u043e \u043e\u043d \u0438\u043c\u0435\u0435\u0442 \u0442\u0438\u043f <i>byte<\/i>, \u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442 \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0442 0 \u0434\u043e 255. \u042d\u0442\u043e\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <i>y<\/i>. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u044f <i>hasElements<\/i>: \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0437\u043d\u0430\u0435\u0442 \u043f\u0440\u043e \u0442\u043e \u0447\u0442\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <i>Count<\/i> \u0443 \u0441\u043f\u0438\u0441\u043a\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <i>hasElements<\/i> \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u043e <i>true<\/i>. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f <i>hasElements<\/i> &amp;&amp; <i>y<\/i> &gt;= 0 \u043c\u044b \u0437\u043d\u0430\u0435\u043c \u0447\u0442\u043e \u043b\u0435\u0432\u0430\u044f \u0438 \u043f\u0440\u0430\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u0438 \u0438\u0441\u0442\u0438\u043d\u043d\u044b \u0438 \u0437\u043d\u0430\u0447\u0438\u0442 \u0432\u0441\u0451 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0442\u043e\u0436\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u0442\u0438\u043d\u043d\u043e \u2014 \u0437\u0434\u0435\u0441\u044c \u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 <a href=\"http:\/\/www.viva64.com\/ru\/d\/0391\/\">V3022<\/a>.<\/p>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043a\u0430\u043a \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h2>\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/h2>\n<p>  \u0414\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0446\u0435\u043b\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043e\u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434:  <\/p>\n<pre><code class=\"cpp\">public void Func(int x) {     if (x &gt;= -10 &amp;&amp; x &lt;= 10 &amp;&amp; x != 0)     {         int y = x + 5;     } }<\/code><\/pre>\n<p>  \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <i>x<\/i> \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e \u0438 \u0435\u0451 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u2014 \u0432\u0441\u0435 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u0430 <i>int<\/i>: [int.MinValue, int.MaxValue]. \u041f\u0440\u0438 \u0432\u0445\u043e\u0434\u0435 \u0432 \u0431\u043b\u043e\u043a <i>if<\/i> \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u0442\u043e\u0447\u043d\u0438\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u043b\u043e\u043a\u0430 <i>if<\/i> \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <i>x<\/i> \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d [-10, -1], [1, 10]. \u0415\u0441\u043b\u0438 \u0442\u0435\u043f\u0435\u0440\u044c <i>x<\/i> \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0442\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0443\u0447\u0442\u0451\u0442 \u0435\u0451 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 <i>y<\/i> \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 [-5, 4], [6, 15].<\/p>\n<p>  \u0414\u043b\u044f \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0442\u0438\u043f\u0430 <i>bool<\/i> \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e-\u0434\u0440\u0443\u0433\u043e\u043c\u0443. \u0417\u0434\u0435\u0441\u044c \u0443 \u043d\u0430\u0441 \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0440\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430: \u043b\u043e\u0436\u044c, \u0438\u0441\u0442\u0438\u043d\u0430 \u0438\u043b\u0438 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0431\u0435\u0440\u0451\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0432\u043e \u0432\u0441\u0435\u0445 \u043b\u0438 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<pre><code class=\"cpp\">public void Func(uint x) {     bool b = (x &gt;= 0); \/\/V3022 }<\/code><\/pre>\n<p>  \u041a\u0430\u043a\u0438\u0435 \u0431\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <i>x<\/i> \u043c\u044b \u043d\u0438 \u0432\u0437\u044f\u043b\u0438, \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <i>x<\/i> &gt;= 0 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u0442\u0438\u043d\u043d\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432\u043c\u0435\u0441\u0442\u043e <i>x<\/i>, \u043c\u044b \u0443\u0431\u0435\u0434\u0438\u043c\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u0438 \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u043c <i>true<\/i> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f <i>b<\/i>.<\/p>\n<p>  \u0415\u0449\u0451 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 umbraco:  <\/p>\n<pre><code class=\"cpp\">private object Aggregate(object[] args, string name) {     ....     if (name != &quot;Min&quot; || name != &quot;Max&quot;) \/\/V3022     {         throw new ArgumentException(&quot;Can only use min or max...&quot;);     }     .... }<\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0442\u043e\u043c \u0447\u0442\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u0442\u0438\u043d\u043d\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u043c\u0435\u0441\u0442\u043e name \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u00abMin\u00bb, \u00abMax\u00bb, &quot;&quot;, <i>null<\/i>. \u0412 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437 \u044d\u0442\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043b\u0438\u0431\u043e \u043b\u0435\u0432\u0430\u044f, \u043b\u0438\u0431\u043e \u043f\u0440\u0430\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u0442\u0438\u043d\u043d\u0430, \u0437\u043d\u0430\u0447\u0438\u0442 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u0442\u0438\u043d\u043d\u043e.<\/p>\n<p>  \u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430. \u041f\u0440\u0438 \u0437\u0430\u0445\u043e\u0434\u0435 \u0432\u043e \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u0431\u043b\u043e\u043a, \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0441\u0432\u043e\u0439 \u043d\u0430\u0431\u043e\u0440 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u043f\u0438\u044f \u0432\u0441\u0435\u0445 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u0414\u043b\u044f \u0443\u0441\u043b\u043e\u0432\u0438\u0439, \u0446\u0438\u043a\u043b\u043e\u0432 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u043f\u0438\u0440\u0443\u044e\u0442\u0441\u044f, \u043d\u0430 \u043d\u0438\u0445 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u044b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f.<\/p>\n<h2>\u0423\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u0431\u043b\u043e\u043a\u0435 if\/else<\/h2>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043a\u0430\u043a \u0432\u0435\u0434\u0443\u0442 \u0441\u0435\u0431\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0431\u043b\u043e\u043a\u0430 if\/else.  <\/p>\n<pre><code class=\"cpp\">public void Func(int x) {     if (x &gt;= 0)     {                    \/\/x:[0, int.MaxValue]         if (x &lt;= 10)         {                \/\/x:[0, 10]         ....         }         else         {                \/\/x:[11, int.MaxValue]         ....         }     } }<\/code><\/pre>\n<p>  \u041f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 <i>x<\/i> &gt;= 0, PVS-Studio \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <i>x<\/i> \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 <i>if<\/i> \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 [0, int.MaxValue]. \u041f\u043e\u0441\u043b\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044f <i>x<\/i> &lt;= 10 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0435\u0449\u0451 \u0434\u0432\u0435 \u043a\u043e\u043f\u0438\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <i>x <\/i> \u2014 \u043e\u0434\u043d\u0443 \u0434\u043b\u044f \u0431\u043b\u043e\u043a\u0430 <i>if<\/i>, \u0434\u0440\u0443\u0433\u0443\u044e \u0434\u043b\u044f \u0431\u043b\u043e\u043a\u0430 <i>else<\/i>. \u041f\u0440\u0438\u0447\u0451\u043c \u043d\u0430 \u044d\u0442\u0438 \u043a\u043e\u043f\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u044b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0436\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0438\u0437 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438. \u0422\u043e \u0435\u0441\u0442\u044c \u0434\u043b\u044f \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 <i>if<\/i> \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <i>x<\/i> \u0431\u0443\u0434\u0435\u0442 [0, 10], \u0430 \u0434\u043b\u044f \u0431\u043b\u043e\u043a\u0430 <i>else <\/i> \u2014 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u2014 [11, int.MaxValue].<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043e\u0431\u0445\u043e\u0434\u0430 \u0431\u043b\u043e\u043a\u0430 <i>if<\/i>\/<i>else<\/i> \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u0431\u043b\u043e\u043a\u043e\u0432 <i>if<\/i> \u0438 <i>else<\/i> \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. \u0422\u0443\u0442 \u0442\u0430\u043a\u0436\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u0447\u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432 \u043a\u043e\u043d\u0446\u0435 <i>if<\/i> \u0438\u043b\u0438 <i>else<\/i> \u0431\u044b\u043b \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <i>return<\/i>, \u0442\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e. \u041f\u0440\u0438\u043c\u0435\u0440\u044b:  <\/p>\n<pre><code class=\"cpp\">public void Func1(int x) {     bool b1 = false;     bool b2 = false;     if (x &gt;= 0)     {         ....         b1 = true;         b2 = true;     }     else     {         ....         b1 = true;     }     \/\/\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e b1 \u0432\u0441\u0435\u0433\u0434\u0430 true     \/\/\u0410 \u0432\u043e\u0442 b2 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 }  public void Func2(int x) {     if (x &lt; 0)         return;     \/\/\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e x \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0435\u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 }<\/code><\/pre>\n<h2>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0446\u0438\u043a\u043b\u043e\u0432<\/h2>\n<p>  \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0446\u0438\u043a\u043b\u043e\u0432 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u0435\u043b\u043e \u0446\u0438\u043a\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u044c \u0434\u0432\u0430 \u0440\u0430\u0437\u0430. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440.  <\/p>\n<pre><code class=\"cpp\">public void Func() {     int i = 0;     while (i &lt; 10)     {         if (i == 5)         {         ....         }         i++;     } }<\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u0432 \u0431\u043b\u043e\u043a <i>while<\/i>, \u0442\u043e \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f <i>i<\/i> == 5 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0431\u044b \u043b\u043e\u0436\u043d\u043e\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0435 V3022, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0434\u043e \u0446\u0438\u043a\u043b\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <i>i<\/i> \u0431\u044b\u043b\u0430 \u0440\u0430\u0432\u043d\u0430 \u043d\u0443\u043b\u044e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043b\u043e \u0446\u0438\u043a\u043b\u0430, \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043a\u0430\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0432 \u043a\u043e\u043d\u0446\u0435 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432\u043e \u0432\u0441\u0435\u0445 \u0431\u043b\u043e\u043a\u0430\u0445, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <i>continue<\/i>, \u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0434\u043e \u0432\u0445\u043e\u0434\u0430 \u0432 \u0446\u0438\u043a\u043b. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0435\u0441\u043b\u0438 \u043c\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0446\u0438\u043a\u043b <i>for<\/i>, \u043d\u0443\u0436\u043d\u043e \u0443\u0447\u0435\u0441\u0442\u044c \u0431\u043b\u043e\u043a\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0447\u0451\u0442\u0447\u0438\u043a\u0430. \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a \u0432\u0445\u043e\u0434\u0430 \u0432 \u0446\u0438\u043a\u043b \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u044b \u043a \u043d\u0438\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0446\u0438\u043a\u043b\u0430 \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0434\u043b\u044f \u0431\u043b\u043e\u043a\u0430 <i>if<\/i>. \u0422\u0430\u043a \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0439 \u043e\u0431\u0445\u043e\u0434 \u0446\u0438\u043a\u043b\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043e\u0431\u0445\u043e\u0434\u0430 \u0446\u0438\u043a\u043b\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u043e \u0432\u0441\u0435\u0445 \u0442\u043e\u0447\u0435\u043a, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u043e\u0441\u043b\u0435 \u0446\u0438\u043a\u043b\u0430 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u0446\u0438\u043a\u043b\u0430 (\u0435\u0441\u043b\u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u043d\u0438 \u043e\u0434\u043d\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438), \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0442\u0435\u043b\u0430 \u0446\u0438\u043a\u043b\u0430, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 \u0431\u043b\u043e\u043a\u0430\u0445, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b <i>break<\/i> \u0438\u043b\u0438 <i>continue<\/i>. \u0412\u0441\u0435 \u044d\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u044b \u0443\u0436\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u043b\u0438 \u0438 \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u043b\u0438 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043e\u0431\u0445\u043e\u0434\u0430 \u0446\u0438\u043a\u043b\u0430. \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u0438\u0445 \u043d\u0443\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u0435, \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044e \u0446\u0438\u043a\u043b\u0430.<\/p>\n<p>  \u042d\u0442\u043e \u0431\u044b\u043b\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<pre><code class=\"cpp\">public void Func(bool condition1, bool condition2, bool condition3) {     int x = 0;     while (condition1)     {         \/\/x:[0, 1], [3]         if (condition2)         {             x = 2;             break;         }         if (condition3)         {             x = 3;             continue;         }         x = 1;     }     \/\/x:[0, 3] }<\/code><\/pre>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <i>x <\/i> \u0434\u043e \u0432\u0445\u043e\u0434\u0430 \u0432 \u0446\u0438\u043a\u043b \u0440\u0430\u0432\u043d\u0430 \u043d\u0443\u043b\u044e. \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0440\u043e\u0445\u043e\u0434 \u043f\u043e \u0446\u0438\u043a\u043b\u0443, \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442 \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <i>x<\/i> \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f 1, 2 \u0432 \u0431\u043b\u043e\u043a\u0435 \u0441 <i>break<\/i> \u0438 3 \u0432 \u0431\u043b\u043e\u043a\u0435 \u0441 <i>continue<\/i>. \u0422\u0430\u043a \u043a\u0430\u043a \u0443 \u043d\u0430\u0441 \u0442\u0440\u0438 \u0442\u043e\u0447\u043a\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043a \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0446\u0438\u043a\u043b\u0430, \u0442\u043e \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0446\u0438\u043a\u043b\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <i>x<\/i> \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f 0, 1 \u0438\u043b\u0438 3. \u0410 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0437\u0430 \u0446\u0438\u043a\u043b\u043e\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u0438\u0437 \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u0442\u043e\u0447\u0435\u043a. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0434\u0435\u0441\u044c <i>x<\/i> \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0432\u0435\u043d 0, 1, 2 \u0438\u043b\u0438 3. <\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u043a\u0430\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u043b\u043e\u043a\u043e\u0432 <i>case<\/i> \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <i>switch<\/i>, \u0432\u043d\u0443\u0442\u0440\u0438 <i>try<\/i>\/<i>catch<\/i>\/<i>finally<\/i> \u0438 \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u044f\u0437\u044b\u043a\u0430.<\/p>\n<h2>\u0414\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u043d\u043e\u043b\u044c<\/h2>\n<p>  \u0414\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u043d\u043e\u043b\u044c \u2014 \u044d\u0442\u043e \u043e\u0434\u043d\u0430 \u0438\u0437 \u043e\u0448\u0438\u0431\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u044d\u0442\u043e\u0439 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u044f\u043a\u043e\u0435 \u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u043e\u0436\u0435\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u043e\u043b\u044c \u0432 \u0437\u043d\u0430\u043c\u0435\u043d\u0430\u0442\u0435\u043b\u0435, \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a \u0435\u0451 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044e. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<pre><code class=\"cpp\">public int GetBlockCount(int dataLength, int blockSize) {     return dataLength \/ blockSize; }<\/code><\/pre>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>blockSize<\/i> \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u0430 <i>int<\/i>, \u0438 \u043d\u043e\u043b\u044c \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u044d\u0442\u043e\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d. \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u043d\u0430 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434, \u0442\u043e \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 \u043f\u043e\u0442\u0435\u0440\u044f\u0435\u0442 \u0441\u043c\u044b\u0441\u043b, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u0435\u0440\u044f\u044e\u0442\u0441\u044f \u0432 \u0441\u043e\u0442\u043d\u044f\u0445 \u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043d\u0430\u0443\u0447\u0438\u0442\u044c \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u0441\u0440\u0435\u0434\u0438 \u0432\u0441\u0435\u0445 \u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a\u0438\u0435:  <\/p>\n<pre><code class=\"cpp\">public string GetDownloadAvgRateString() {     if (SecondsDownloading &gt;= 0) {         return GetSpeed(Downloaded \/ SecondsDownloading);     } else {         return &quot;&quot;;     } }<\/code><\/pre>\n<p>  \u0438\u043b\u0438 \u0442\u0430\u043a\u0438\u0435:  <\/p>\n<pre><code class=\"cpp\">public void Func(int x, int y) {     for (int i = -10; i &lt;= 10; i++)     {         y = x \/ i;     } }<\/code><\/pre>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043c\u044b \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043d\u0430 \u0442\u043e\u0447\u043d\u044b\u0435 \u0438 \u043d\u0435\u0442\u043e\u0447\u043d\u044b\u0435. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0442\u043e\u0447\u043d\u044b\u043c \u043f\u043e\u043a\u0430 \u0435\u0433\u043e \u043d\u0435 \u0443\u0442\u043e\u0447\u043d\u0438\u043b\u0438 \u043f\u0443\u0442\u0451\u043c \u044f\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0441 \u0442\u043e\u0447\u043d\u044b\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043e\u043c, \u0438\u043b\u0438 \u043f\u0443\u0442\u0451\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 if \u0438\u043b\u0438 \u0446\u0438\u043a\u043b\u0430. \u0415\u0441\u043b\u0438 \u043d\u043e\u043b\u044c \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u044c \u0438\u043b\u0438 \u043d\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u0443 \u0442\u043e\u0447\u043d\u043e\u0433\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430, \u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 \u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u043d\u043e\u043b\u044c \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442.<\/p>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440\u044b<\/h2>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0438\u0437 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 PVS-Studio \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 N1 (RavenDB).<\/b>  <\/p>\n<pre><code class=\"cpp\">internal static void UrlPathEncodeChar (char c, Stream result) {     if (c &lt; 33 || c &gt; 126) {         byte [] bIn = Encoding.UTF8.GetBytes (c.ToString ());         for (int i = 0; i &lt; bIn.Length; i++) {             ....         }     }     else if (c == ' ') { \/\/V3022         result.WriteByte ((byte) '%');         result.WriteByte ((byte) '2');         result.WriteByte ((byte) '0');     }     else         result.WriteByte ((byte) c); }<\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>UrlPathEncodeChar<\/i> \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u0432\u0442\u043e\u0440\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u2014 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0431\u0435\u043b\u0430. \u041d\u043e \u0442\u0430\u043a \u043a\u0430\u043a ASCII \u043a\u043e\u0434 \u043f\u0440\u043e\u0431\u0435\u043b\u0430 \u0440\u0430\u0432\u0435\u043d 32, \u0442\u043e \u043f\u0440\u043e\u0431\u0435\u043b \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u043f\u0435\u0440\u0432\u044b\u043c \u0431\u043b\u043e\u043a\u043e\u043c. PVS-Studio \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u044d\u0442\u0443 \u043e\u0448\u0438\u0431\u043a\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u043b\u043e\u043a\u0430 <i>if<\/i> \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <i>c<\/i> \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u043e [0, 32], [127, char.MaxValue], \u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 <i>else <\/i> \u2014 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f: [33, 126]. \u0422\u0430\u043a \u043a\u0430\u043a \u043a\u043e\u0434 \u043f\u0440\u043e\u0431\u0435\u043b\u0430 \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 \u044d\u0442\u043e\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d, \u0442\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435 <a href=\"http:\/\/www.viva64.com\/ru\/d\/0391\/\">V3022<\/a> \u2014 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 c == &#8216; &#8216; \u0432\u0441\u0435\u0433\u0434\u0430 \u043b\u043e\u0436\u043d\u043e.<\/p>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 N2 (ServiceStack).<\/b>  <\/p>\n<pre><code class=\"cpp\">protected override sealed void Initialize() {     if (RootDirInfo == null)         RootDirInfo = new DirectoryInfo(WebHostPhysicalPath);      if (RootDirInfo == null || !RootDirInfo.Exists) \/\/V3063         throw new ApplicationException(&quot;...&quot;);     .... }<\/code><\/pre>\n<p>  \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>Initialize <\/i> \u043f\u0440\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <i>RootDirInfo <\/i> \u043d\u0430\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e. \u041f\u043e\u0441\u043b\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0443\u0441\u043b\u043e\u0432\u0438\u044f <i>RootDirInfo<\/i> == <i>null<\/i> \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0435\u0449\u0451 2 \u043a\u043e\u043f\u0438\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439: \u043e\u0434\u043d\u0430 \u0434\u043b\u044f \u0431\u043b\u043e\u043a\u0430 <i>if<\/i> \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c <i>RootDirInfo<\/i> \u0440\u0430\u0432\u0435\u043d <i>null<\/i>, \u0438 \u0432\u0442\u043e\u0440\u0430\u044f \u0434\u043b\u044f \u0431\u043b\u043e\u043a\u0430 <i>else<\/i>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c <i>RootDirInfo<\/i> \u043d\u0435 \u0440\u0430\u0432\u0435\u043d <i>null<\/i>. \u0425\u043e\u0442\u044f \u0431\u043b\u043e\u043a\u0430 <i>else<\/i> \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u0435\u0442, \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f. \u0414\u0430\u043b\u044c\u0448\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u043b\u043e\u043a\u0430 <i>if<\/i> \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <i>RootDirInfo<\/i> \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u044b\u0437\u043e\u0432\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430. \u0422\u0430\u043a \u043a\u0430\u043a \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <i>null<\/i>, \u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <i>RootDirInfo<\/i> \u0432 \u0431\u043b\u043e\u043a\u0435 <i>if<\/i> \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0435 \u0440\u0430\u0432\u043d\u043e <i>null<\/i>. \u0422\u0430\u043a \u043a\u0430\u043a <i>RootDirInfo<\/i> \u0434\u043b\u044f \u0431\u043b\u043e\u043a\u0430 <i>else<\/i> \u0442\u043e\u0436\u0435 \u043d\u0435 \u0440\u0430\u0432\u0435\u043d <i>null<\/i>, \u0442\u043e \u043f\u0440\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0438 \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 \u0432\u0435\u0442\u043e\u043a \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0447\u0442\u043e <i>RootDirInfo<\/i> \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d <i>null<\/i>. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044f PVS-Studio \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435 <a href=\"http:\/\/www.viva64.com\/ru\/d\/0461\/\">V3063<\/a> \u2014 \u0447\u0430\u0441\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0432\u0441\u0435\u0433\u0434\u0430 \u043b\u043e\u0436\u043d\u0430.<\/p>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 N3 (ServiceStack).<\/b>  <\/p>\n<pre><code class=\"cpp\">public static TextNode ParseTypeIntoNodes(this string typeDef) {     ....     var lastBlockPos = typeDef.IndexOf('&lt;');     if (lastBlockPos &gt;= 0)     {         ....         \/\/V3022         while (lastBlockPos != -1 || blockStartingPos.Count == 0)         {             var nextPos = typeDef.IndexOfAny(blockChars,                 lastBlockPos + 1);             if (nextPos == -1)                 break;             ....             lastBlockPos = nextPos;         }     } }<\/code><\/pre>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <i>lastBlockPos<\/i>. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0432 \u043d\u0435\u0451 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>IndexOf<\/i>. \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0437\u043d\u0430\u0435\u0442, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <i>IndexOf<\/i>, <i>IndexOfAny<\/i>, <i>LastIndexOf<\/i>, <i>LastIndexOfAny<\/i> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u043d\u0435\u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 -1. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <i>lastBlockPos<\/i> \u0431\u0443\u0434\u0435\u0442 [-1, int.MaxValue]. \u041f\u043e\u0441\u043b\u0435 \u0432\u0445\u043e\u0434\u0430 \u0432 \u0431\u043b\u043e\u043a <i>if<\/i> \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 [0, int.MaxValue]. \u0414\u0430\u043b\u044c\u0448\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442 \u043f\u0440\u043e\u0445\u043e\u0434 \u043f\u043e \u0442\u0435\u043b\u0443 \u0446\u0438\u043a\u043b\u0430 <i>while<\/i>. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <i>nextPos<\/i> \u043f\u0440\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d [-1, int.MaxValue]. \u041f\u043e\u0441\u043b\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0443\u0441\u043b\u043e\u0432\u0438\u044f if (<i>nextPos<\/i> == -1) \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0434\u0432\u0435 \u043a\u043e\u043f\u0438\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <i>nextPost<\/i>: [-1] \u0434\u043b\u044f \u0432\u0435\u0442\u043a\u0438 <i>if<\/i> \u0438 [0, int.MaxValue] \u0434\u043b\u044f \u0432\u0435\u0442\u043a\u0438 <i>else<\/i>. \u0422\u0430\u043a \u043a\u0430\u043a \u0432\u0435\u0442\u043a\u0430 <i>if<\/i> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <i>break<\/i>, \u0442\u043e \u0432 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u043c \u0442\u0435\u043b\u0435 \u0446\u0438\u043a\u043b\u0430 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <i>nextPost<\/i> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0435\u0442\u043a\u0438 <i>else<\/i>: [0, int.MaxValue], \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0446\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <i>lastBlockPos<\/i>.<\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0432\u0435 \u0442\u043e\u0447\u043a\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043a \u0442\u0435\u043b\u0443 \u0446\u0438\u043a\u043b\u0430: \u043e\u0434\u043d\u0430 \u043f\u0440\u0438 \u0432\u0445\u043e\u0434\u0435 \u0432 \u0446\u0438\u043a\u043b, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 <i>lastBlockPos<\/i> \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 [0, int.MaxValue] \u0438 \u0432\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u043a \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 <i>lastBlockPos<\/i> \u0442\u043e\u0436\u0435 \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 [0, int.MaxValue]. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, <i>lastBlockPos<\/i> \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0446\u0438\u043a\u043b\u0430, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0446\u0438\u043a\u043b\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u0442\u0438\u043d\u043d\u043e, \u043e \u0447\u0451\u043c \u0438 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 <a href=\"http:\/\/www.viva64.com\/ru\/d\/0391\/\">V3022<\/a>.<\/p>\n<p>  \u0421\u0442\u043e\u0438\u0442 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0430\u0439\u0442\u0438 \u044d\u0442\u0443 \u043e\u0448\u0438\u0431\u043a\u0443 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0442\u0435\u043b\u043e \u0446\u0438\u043a\u043b\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u043a\u043e\u043b\u043e \u0441\u043e\u0440\u043e\u043a\u0430 \u0441\u0442\u0440\u043e\u043a \u0438 \u043f\u0440\u043e\u0441\u043b\u0435\u0434\u0438\u0442\u044c \u043f\u0440\u043e\u0445\u043e\u0434 \u043f\u043e \u0432\u0441\u0435\u043c \u0432\u0435\u0442\u043a\u0430\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e.<\/p>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 N4 (TransmissionRemoteDotnet).<\/b>  <\/p>\n<pre><code class=\"cpp\">\/\/ Converts an IPv4 address into a long, for reading from geo database long AddressToLong(IPAddress ip) {     long num = 0;     byte[] bytes = ip.GetAddressBytes();     for (int i = 0; i &lt; 4; ++i)     {         long y = bytes[i];         if (y &lt; 0) \/\/V3022             y += 256;         num += y &lt;&lt; ((3 - i) * 8);     }      return num; }<\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e y \u0442\u0438\u043f\u0430 <i>long<\/i> \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u0430 <i>byte<\/i>. \u0422\u0430\u043a \u043a\u0430\u043a \u0442\u0438\u043f <i>byte <\/i> \u0431\u0435\u0437\u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0439, \u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 <i>y <\/i> &lt; 0 \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u0430.<\/p>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 N5 (MSBuild).<\/b>  <\/p>\n<pre><code class=\"cpp\">private bool ValidateTaskNode() {     bool foundInvalidNode = false;     foreach (XmlNode childNode in _taskNode.ChildNodes)     {         switch (childNode.NodeType)         {             case XmlNodeType.Comment:             case XmlNodeType.Whitespace:             case XmlNodeType.Text:                 \/\/ These are legal, and ignored                 continue;             case XmlNodeType.Element:                 if (childNode.Name.Equals(&quot;Code&quot;) ||                     childNode.Name.Equals(&quot;Reference&quot;) ||                     childNode.Name.Equals(&quot;Using&quot;))                 {                     continue;                 }                 else                 {                      foundInvalidNode = true;                 }                 break;             default:                 foundInvalidNode = true;                 break;         }          if (foundInvalidNode) \/\/V3022         {             ....             return false;         }     }      return true; }<\/code><\/pre>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0442\u0435\u043b\u043e \u0446\u0438\u043a\u043b\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0432\u0430 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u2014 <i>switch<\/i> \u0438 <i>if<\/i>. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0431\u043b\u043e\u043a <i>switch<\/i>. \u041f\u0435\u0440\u0432\u0430\u044f \u0441\u0435\u043a\u0446\u0438\u044f \u0441 \u0442\u0440\u0435\u043c\u044f <i>case<\/i> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <i>continue<\/i>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0442\u0441\u044e\u0434\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043a \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f <i>foundInvalidNode<\/i>. \u0412\u0442\u043e\u0440\u0430\u044f \u0441\u0435\u043a\u0446\u0438\u044f <i>case<\/i> \u043b\u0438\u0431\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0446\u0438\u043a\u043b\u0430, \u043b\u0438\u0431\u043e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 <i>foundInvalidNode<\/i> \u0432 <i>true<\/i> \u0438 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0438\u0437 <i>switch<\/i>. \u0418, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0441\u0435\u043a\u0446\u0438\u044f <i>default<\/i> \u0442\u043e\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 <i>foundInvalidNode<\/i> \u0432 <i>true<\/i> \u0438 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0438\u0437 <i>switch<\/i>. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 <i>switch<\/i> \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <i>foundInvalidNode<\/i> \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u0442\u0438\u043d\u043d\u0430, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 <i>if<\/i> \u043b\u0438\u0448\u043d\u0438\u0439. \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u0440\u0438\u043d\u044f\u043b \u0432\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0447\u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u0431\u043b\u043e\u043a\u0435 <i>switch<\/i> \u0435\u0441\u0442\u044c \u0432\u0435\u0442\u043a\u0430 <i>default<\/i>, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0441\u0440\u0430\u0437\u0443 \u043a \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u2014 \u043e\u0434\u043d\u0430 \u0438\u0437 <i>switch<\/i>-\u0441\u0435\u043a\u0446\u0438\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430.<\/p>\n<p>  \u041d\u0443\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u044d\u0442\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <i>switch continue<\/i> \u0438\u043c\u0435\u0435\u0442 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u043a \u0446\u0438\u043a\u043b\u0443, \u0430 <i>break<\/i> \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442 \u0432\u044b\u0445\u043e\u0434 \u0438\u0437 <i>switch<\/i>, \u0430 \u043d\u0435 \u0438\u0437 \u0446\u0438\u043a\u043b\u0430!<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u2014 \u044d\u0442\u043e \u043c\u043e\u0449\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043e\u0448\u0438\u0431\u043e\u043a. \u041a\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f, \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0438 \u0446\u0438\u043a\u043b\u044b, \u0431\u043b\u043e\u043a\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0432 \u0441\u043e\u0442\u043d\u0438 \u0441\u0442\u0440\u043e\u043a. \u041f\u0440\u043e\u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043a\u0430\u043a \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0438 \u043d\u0430\u0439\u0442\u0438 \u043e\u0448\u0438\u0431\u043a\u0443 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0441\u043b\u043e\u0436\u043d\u043e \u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 <a href=\"http:\/\/www.viva64.com\/ru\/pvs-studio\/\">PVS-Studio<\/a> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0445\u043e\u0440\u043e\u0448\u0438\u043c \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u043e\u043c \u0432 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u043c\u043d\u043e\u0433\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a.<\/p>\n<p>  <a href=\"http:\/\/www.viva64.com\/en\/b\/0394\/\"><\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/35e\/064\/ddf\/35e064ddf91f5d99b620384893909ff7.png\" \/><\/div>\n<p><\/a><br \/>  \u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0441 \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0435\u0439, \u0442\u043e \u043f\u0440\u043e\u0448\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434: Ilya Ivanov. <a href=\"http:\/\/www.viva64.com\/en\/b\/0394\/\">Searching for errors by means of virtual values evaluation<\/a>.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u043e\u0447\u0438\u0442\u0430\u043b\u0438 \u0441\u0442\u0430\u0442\u044c\u044e \u0438 \u0435\u0441\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441?<\/b><\/p>\n<div class=\"spoiler_text\">\u0427\u0430\u0441\u0442\u043e \u043a \u043d\u0430\u0448\u0438\u043c \u0441\u0442\u0430\u0442\u044c\u044f\u043c \u0437\u0430\u0434\u0430\u044e\u0442 \u043e\u0434\u043d\u0438 \u0438 \u0442\u0435 \u0436\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b. \u041e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u043d\u0438\u0445 \u043c\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438 \u0437\u0434\u0435\u0441\u044c: <a href=\"http:\/\/www.viva64.com\/ru\/a\/0085\/\">\u041e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u0440\u043e PVS-Studio, \u0432\u0435\u0440\u0441\u0438\u044f 2015<\/a>. \u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c.  <\/div>\n<\/div>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/282998\/\"> https:\/\/habrahabr.ru\/post\/282998\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0442\u043e\u0447\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430. \u042d\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u043e\u0448\u0438\u0431\u043e\u043a. \u041c\u044b \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0442\u0430\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438, \u043e \u043d\u0438\u0445 \u0438 \u0431\u0443\u0434\u0435\u0442 \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/e53\/3a5\/dca\/e533a5dcae7c615fa543e2ba68c25783.png\" align=\"left\"\/>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-279625","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/279625","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=279625"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/279625\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=279625"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=279625"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=279625"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}