{"id":209008,"date":"2014-01-14T11:48:03","date_gmt":"2014-01-14T07:48:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=209008"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=209008","title":{"rendered":"<span class=\"post_title\">6 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u043e C# \u0441 \u043f\u043e\u0434\u0432\u043e\u0445\u043e\u043c<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u041f\u043e\u0447\u0438\u0442\u0430\u0432 <a href=\"http:\/\/habrahabr.ru\/post\/208870\/\">10 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u043d\u0430 c# \u0441 \u043f\u043e\u0434\u0432\u043e\u0445\u043e\u043c<\/a> \u044f \u043e\u0433\u043e\u0440\u0447\u0438\u043b\u0441\u044f \u0442.\u043a. \u043f\u043e \u0441\u0443\u0442\u0438 \u0441\u0432\u043e\u0435\u0439 \u0442\u0430\u043c \u0438 \u043f\u043e\u0434\u0432\u043e\u0445\u043e\u0432-\u0442\u043e \u043d\u0435 \u0431\u044b\u043b\u043e \u043e\u0441\u043e\u0431\u043e (\u044d\u0442\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u0434\u043e &quot;\u0447\u0435\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u043e i++ + ++i&quot;)\u2026 \u041f\u043e\u0441\u0435\u043c\u0443 \u0440\u0435\u0448\u0438\u043b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0432\u0441\u043f\u043e\u043c\u0438\u043d\u0430\u0442\u044c \u043f\u043e\u0434\u0432\u043e\u0445\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u0432\u0438\u0434\u0435\u0442\u044c \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u0432 \u0436\u0438\u0437\u043d\u0438 8-). \u0423\u0440\u043e\u0432\u0435\u043d\u044c \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 middle \u043d\u0430\u0432\u0435\u0440\u043d\u043e.<\/p>\n<p>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u041e\u0442\u043a\u0430\u0437 \u043e\u0442 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438<\/h4>\n<p>  <i>\u041c\u043d\u043e\u0433\u043e\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0436\u0443\u0442\u043a\u0438\u043c \u0431\u0430\u044f\u043d\u043e\u043c. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043d\u0435 \u043c\u043e\u0438, \u043d\u043e \u043c\u043d\u043e\u0439 \u0438\u0437\u0443\u0447\u0435\u043d\u044b (\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0438\u0436\u0435) (\u0435\u0441\u043b\u0438 \u0430\u0432\u0442\u043e\u0440\u044b (\u043e\u043d\u0438 \u043c\u043d\u0435 \u0438 \u043d\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b \u0447\u0430\u0441\u0442\u043e) \u0445\u043e\u0442\u044f\u0442 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u0438\u0445 \u043a\u0430\u043a \u043f\u0435\u0440\u0432\u043e\u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u2014 \u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043b\u0438\u0447\u043a\u0443 \u2014 \u043e\u0431\u043d\u043e\u0432\u043b\u044e \u043f\u043e\u0441\u0442).<br \/>  \u041f\u043e\u043c\u043d\u0438\u0442\u0435 \u0447\u0442\u043e \u043f\u0438\u0441\u0430\u043b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u2014 \u044f \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0441\u044f \u0434\u043e\u043d\u0435\u0441\u0442\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0441\u0443\u0442\u044c \u0434\u043e \u0442\u0435\u0445 \u043a\u0442\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0435\u0442, \u043d\u043e \u044f\u0437\u044b\u043a \u0441\u0443\u0445 \u0438 \u0441\u043a\u0443\u0447\u0435\u043d. \u041d\u0443 \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u044d\u0442\u043e \u043b\u0438\u0448\u044c \u0442\u043e \u0447\u0442\u043e \u043f\u0440\u0438\u0448\u043b\u043e \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u043c\u0438\u043d\u0443\u0442 \u0437\u0430 20.<\/p>\n<p>  \u041d\u0443 \u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u044d\u0442\u043e \u0445\u043e\u043b\u0438\u0432\u0430\u0440\u043d\u044b\u0439 \u0442\u043e\u043f\u0438\u043a, \u0441\u043a\u043e\u0440\u0435\u0435 \u0434\u0430\u0436\u0435 \u0437\u0430\u043c\u0435\u0442\u043a\u0430 \u0447\u0442\u043e\u0431\u044b &quot;\u043d\u0435 \u043e\u0442\u0435\u043a\u043b\u0438 \u043c\u043e\u0437\u0433\u0438&quot;. \u0422\u0443\u0442 \u0434\u0430\u0436\u0435 \u0444\u043e\u0442\u043a\u0438 \u043a\u043e\u0442\u044f\u0442\u043e\u043a \u043d\u0435\u0442.<\/p>\n<p>  \u0413\u043e\u0442\u043e\u0432\u044b? \u0422\u043e\u0433\u0434\u0430 \u043f\u043e\u0435\u0445\u0430\u043b\u0438&#8230;<\/i><\/p>\n<h4>\u0417\u0430\u0434\u0430\u0447\u0430 1<\/h4>\n<p>  \u0427\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u0435\u0434\u0435\u043d\u043e \u043d\u0430 \u044d\u043a\u0440\u0430\u043d?  <\/p>\n<pre><code>using System; using System.Xml;  public class Program {     public static void Main()     {         Bar(XmlWriter =&gt; XmlWriter.Flush());         Bar(XmlReader =&gt; XmlReader.Flush());     }      private static void Bar(Action&lt;XmlWriter&gt; x)     {         Console.WriteLine(&quot;W&quot;);     }      private static void Bar(Action&lt;XmlReader&gt; x)     {         Console.WriteLine(&quot;R&quot;);     } } <\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0438 \u043e\u0442\u0432\u0435\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\u0412\u044b\u0432\u0435\u0434\u0435\u0442\u0441\u044f <b>W W<\/b>.<br \/>  \u041c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u044b\u0432\u0430\u0442\u044c <a href=\"http:\/\/dotnetfiddle.net\/wFwF2Y\">\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c<\/a> \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c.<\/p>\n<p>  \u0421\u0443\u0442\u044c \u044d\u0442\u043e\u0433\u043e \u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 &quot;7.6.4.1 Identical simple names and type names&quot; \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437\u0434\u0435\u043b \u0446\u0435\u043b\u0438\u043a\u043e\u043c:<br \/>  In a member access of the form E.I, if E is a single identifier, and if the meaning of E as a simple-name (\u00a77.6.2) is a constant, field, property, local variable, or parameter with the same type as the meaning of E as a type-name (\u00a73.8), then both possible meanings of E are permitted. The two possible meanings of E.I are never ambiguous, since I must necessarily be a member of the type E in both cases. In other words, the rule simply permits access to the static members and nested types of E where a compile-time error would otherwise have occurred. For example:  <\/p>\n<pre><code>struct Color { \tpublic static readonly Color White = new Color(...); \tpublic static readonly Color Black = new Color(...); \tpublic Color Complement() {...} } class A { \tpublic Color Color;\t\t\t\t\t\/\/ Field Color of type Color \tvoid F() { \t\tColor = Color.Black; \t\t\t\/\/ References Color.Black static member \t\tColor = Color.Complement();\t\/\/ Invokes Complement() on Color field \t} \tstatic void G() { \t\tColor c = Color.White;\t\t\t\/\/ References Color.White static member \t} } <\/code><\/pre>\n<p>  Within the A class, those occurrences of the Color identifier that reference the Color type are underlined, and those that reference the Color field are not underlined.<\/p>\n<p>  \u041a\u0440\u0430\u0442\u043a\u043e \u0441\u0443\u0442\u044c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a: \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043e\u0433\u0434\u0430 \u0438\u043c\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0442\u0438\u043f\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u0439\u0442\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0447\u043b\u0435\u043d\u044b \u0438\u043b\u0438 \u0441\u0443\u0431\u043a\u043b\u0430\u0441\u0441\u044b \u0441 \u0438\u043c\u0435\u043d\u0435\u043c (\u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0442\u0438\u043f\u0430), \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0447\u043a\u0438, \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0447\u043b\u0435\u043d\u043e\u0432 \u0441 \u0442\u0430\u043a\u0438\u043c \u0438\u043c\u0435\u043d\u0435\u043c. \u041f\u0440\u0438 \u043d\u0435\u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u0432\u044b\u0434\u0430\u0441\u0442 \u043e\u0448\u0438\u0431\u043a\u0443 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e.<br \/>  \u0418\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0438 \u0434\u0430\u0451\u0442 \u044d\u0442\u043e\u0442 \u044d\u0444\u0444\u0435\u043a\u0442: \u0442.\u043a. \u0443 <strong>XmlReader<\/strong>-\u0430 \u043d\u0435\u0442 \u043c\u0435\u0442\u043e\u0434\u0430 <strong>Flush()<\/strong> (\u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 <strong>XmlWriter<\/strong>), \u0442\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0442\u0438\u043f \u0434\u0435\u043b\u0435\u0433\u0430\u0442\u0430 \u0432 \u043e\u0431\u043e\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043a\u0430\u043a <strong>Action&lt;XmlWriter&gt;<\/strong> \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 <strong>W<\/strong>.  <\/div>\n<\/div>\n<h4>\u0417\u0430\u0434\u0430\u0447\u0430 2<\/h4>\n<p>  \u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u0433\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <strong>await<\/strong> \u0434\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u043f\u043e\u043c\u0435\u0447\u0435\u043d \u043a\u0430\u043a <strong>async<\/strong>?<br \/>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0440\u0435\u0447\u044c \u043d\u0435 \u0438\u0434\u0451\u0442 \u043e \u00ab\u043d\u0435 \u0441\u0432\u043e\u0438\u0445\u00bb \u043a\u043b\u0430\u0441\u0441\u0430\u0445.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0438 \u043e\u0442\u0432\u0435\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\u0414\u0430, \u043c\u043e\u0436\u043d\u043e. \u0418 \u043f\u0443\u0442\u0435\u0439 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e.<br \/>  \u0415\u0441\u043b\u0438 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0447\u0442\u043e \u043f\u0440\u0438 \u0432\u0441\u0442\u0440\u0435\u0447\u0435 \u0441\u043b\u043e\u0432\u0430 <strong>await<\/strong> \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <a href=\"http:\/\/ru.wikipedia.org\/wiki\/%D0%A3%D1%82%D0%B8%D0%BD%D0%B0%D1%8F_%D1%82%D0%B8%D0%BF%D0%B8%D0%B7%D0%B0%D1%86%D0%B8%D1%8F\">\u0443\u0442\u0438\u043d\u0443\u044e \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044e<\/a> \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043a\u0430\u043d\u0434\u0438\u0434\u0430\u0442\u043e\u0432 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0432 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u043e\u043c \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0435, \u0442\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u0432\u044b\u043b\u044c\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u043e\u0434\u0431\u043e\u0440 \u043d\u0443\u0436\u043d\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u0439.<\/p>\n<p>  \u0421\u0445\u043e\u0434\u0443 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u043e\u0440\u0443\u0434\u0438\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e:  <\/p>\n<pre><code>using System.Runtime.CompilerServices;  class Program {     private static void Main()     {         MainAsync();     }      private async static void MainAsync()     {         await Foo();     }      static Target Foo()     {         return new Target();     } }  class Target {     public TaskAwaiter GetAwaiter()     {         return new TaskAwaiter();     } } <\/code><\/pre>\n<p>  \u0410 \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0442\u0435\u0445 \u0436\u0435 \u0446\u0435\u043b\u0435\u0439 \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0430\u043a:  <\/p>\n<pre><code>using System.Runtime.CompilerServices;  class Program {     private static void Main()     {         MainAsync();     }      private async static void MainAsync()     {         await Foo();     }      static Target Foo()     {         return new Target();     } }  class Target {      }  static class TargetEx {     public static TaskAwaiter GetAwaiter(this Target t)     {         return new TaskAwaiter();     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<h4>\u0417\u0430\u0434\u0430\u0447\u0430 3<\/h4>\n<p>  <i>\u0421\u043a\u043e\u0440\u0435\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0442\u0430\u0432\u0438\u0442 \u0432 \u0442\u0443\u043f\u0438\u043a, \u0447\u0435\u043c \u0437\u0430\u0434\u0430\u0447\u0430 \u0441 \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u043e\u0441\u0442\u044f\u043c\u0438.<\/i><br \/>  \u041c\u043e\u0436\u043d\u043e \u043b\u0438 &quot;\u043d\u0430\u0443\u0447\u0438\u0442\u044c&quot; \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0441\u0442\u0438 \u0441\u0442\u0430\u0440\u044b\u0435 (.net2) \u043a\u043b\u0430\u0441\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u044e\u0442 \u043f\u0430\u0442\u0442\u0435\u0440\u043d <strong>IAsyncResult<\/strong>* \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u0445 \u043a\u043e\u0434\u0430?<br \/>  *) \u043f\u043e\u0434 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u043c <strong>IAsyncResult<\/strong> \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043f\u0430\u0440\u044b \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0432\u0438\u0434\u0430:  <\/p>\n<pre><code>IAsyncResult BeginXXX(AsyncCallback callback); void EndXXX(IAsyncResult); <\/code><\/pre>\n<p>  , \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u044e\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e. <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms228963%28v=vs.110%29.aspx\">\u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435<\/a> \u0432 MSDN.<br \/>  **) \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0441\u044f \u0447\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0432\u0435\u0440\u0441\u0438\u0438, \u0433\u0434\u0435 async\\await \u0443\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0438 \u043e\u0442\u0432\u0435\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\u0414\u0430, \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 (\u0432 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438) \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <strong>TaskCompletionSource<\/strong> \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f (\u0438\u043b\u0438 <strong>Task.Factory.FromAsyncPattern<\/strong>, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043e\u0434\u043d\u043e \u0438 \u0442\u043e\u0436\u0435).<\/p>\n<p>  \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443:  <\/p>\n<pre><code>using System; using System.Threading; using System.Threading.Tasks;   class Program {     private static void Main()     {         MainAsync();         Console.ReadLine();     }      private async static void MainAsync()     {         var ogc = new OldGoodClass();         await ogc.OperationAsync().ConfigureAwait(false);     } }   static class OldGoodClassEx {     public static Task OperationAsync(this OldGoodClass ogc)     {         var tsc = new TaskCompletionSource&lt;object&gt;(ogc);         AsyncCallback onDone = (ar) =&gt;         {             ogc.EndOperation(ar);             tsc.SetResult(null);         };         ogc.BeginOperation(onDone);         return tsc.Task;     } }    class OldGoodClass {     class AsyncResult : IAsyncResult     {         #region Implementation of IAsyncResult          public bool IsCompleted { get; set; }         public WaitHandle AsyncWaitHandle { get; set; }         public object AsyncState { get; set; }         public bool CompletedSynchronously         {             get { return false; }         }          #endregion     }      public IAsyncResult BeginOperation(AsyncCallback onDone)     {         var rv = new AsyncResult();         ThreadPool.QueueUserWorkItem(s =&gt;         {             Thread.Sleep(2000);             var ar = (AsyncResult) s;             ar.IsCompleted = true;             if (onDone != null) onDone(ar);         }, rv);         return rv;     }      public void EndOperation(IAsyncResult r)     {         while (!r.IsCompleted) { }     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<h4>\u0417\u0430\u0434\u0430\u0447\u0430 4<\/h4>\n<p>  \u0427\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u0432 release?<br \/>  \u0427\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u0432 release \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u043e\u0434 \u0434\u0435\u0431\u0430\u0433\u043e\u043c?  <\/p>\n<pre><code> using System;   internal class Program {     private class MyClass     {         public MyClass()         {             Console.WriteLine(&quot;ctor&quot;);              GC.Collect();             GC.WaitForPendingFinalizers();         }          ~MyClass()         {             Console.WriteLine(&quot;dtor&quot;);         }     }       private static void Main(string[] args)     {         var myClass = new MyClass();         if (myClass != null)         {             Console.WriteLine(&quot;not null&quot;);         }         else         {             Console.WriteLine(&quot;null&quot;);         }      } } <\/code><\/pre>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0438 \u043e\u0442\u0432\u0435\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\u0421\u0443\u0442\u044c \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432 JIT-\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0438\u0441\u043a\u0430 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 \u0438, \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435, \u0435\u0451 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c GC.<br \/>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c. <br \/>  \u0422\u0430\u043a \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 JIT-\u0430 Misrosoft \u043f\u043e\u0434 Windows (\u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0439 JIT) \u0432 \u0432\u0435\u0440\u0441\u0438\u0438 .net4 \u044d\u0442\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0442\u0430\u043a:<br \/>   \u2014 \u0432 release \u0441\u0431\u043e\u0440\u043a\u0435, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0439 \u0431\u0435\u0437 \u0434\u0435\u0431\u0430\u0433\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u044d\u0442\u0438 \u0441\u0430\u043c\u044b\u0435 \u00ab\u0440\u0435\u0433\u0438\u043e\u043d\u044b\u00bb,<br \/>   \u2014 \u0432 release \u0441\u0431\u043e\u0440\u043a\u0435, \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0439 \u043f\u043e\u0434 \u0434\u0435\u0431\u0430\u0433\u043e\u043c, \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0434\u043b\u0435\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u043c\u0435\u0442\u043e\u0434\u0430.<br \/>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 .net4.5 \u0431\u0435\u0437 \u0434\u0435\u0431\u0430\u0433\u0430 (\u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u0432 release \u0440\u0435\u0436\u0438\u043c\u0435) \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0430\u043d\u043e [ctor, dtor, not null], \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043f\u043e\u0434 \u0434\u0435\u0431\u0430\u0433\u043e\u043c \u0442\u043e\u0439 \u0436\u0435 \u0441\u0431\u043e\u0440\u043a\u0438: [ctor, not null] (\u041d\u0435 \u0432\u0438\u0434\u0438\u0442\u0435 \u043f\u043e\u0434\u0432\u043e\u0445? \u0412\u0434\u0443\u043c\u0430\u0439\u0442\u0435\u0441\u044c \u0432 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u0432\u044b\u0432\u0435\u043b\u043e\u0441\u044c).<br \/>  \u041a\u043e\u0434, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 JIT-\u043e\u043c \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0437\u043d\u044b\u0439:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 x86 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>    &gt;&gt;&gt; 002800D8 55               push        ebp     002800D9 8BEC             mov         ebp,esp     002800DB 83EC0C           sub         esp,0Ch     002800DE 33C0             xor         eax,eax     002800E0 8945F4           mov         dword ptr [ebp-0Ch],eax     002800E3 894DFC           mov         dword ptr [ebp-4],ecx     002800E6 833D6031150000   cmp         dword ptr ds:[00153160h],0     002800ED 7405             je          002800F4     002800EF E83A796362       call        628B7A2E (JitHelp: CORINFO_HELP_DBG_IS_JUST_MY_CODE)     002800F4 33D2             xor         edx,edx     002800F6 8955F8           mov         dword ptr [ebp-8],edx     002800F9 B918381500       mov         ecx,153818h (MT: ConsoleApplication11.Program+MyClass)     002800FE E8C9833A62       call        626284CC (JitHelp: CORINFO_HELP_NEWFAST)     00280103 8945F4           mov         dword ptr [ebp-0Ch],eax     00280106 8B4DF4           mov         ecx,dword ptr [ebp-0Ch]     00280109 FF1538381500     call        dword ptr ds:[00153838h] (ConsoleApplication11.Program+MyClass..ctor(), mdToken: 06000004)     0028010F 8B45F4           mov         eax,dword ptr [ebp-0Ch]     00280112 8945F8           mov         dword ptr [ebp-8],eax     00280115 837DF800         cmp         dword ptr [ebp-8],0     00280119 7410             je          0028012B     0028011B 8B0D38213803     mov         ecx,dword ptr ds:[03382138h] (&quot;not null&quot;)     00280121 E8FACD6561       call        618DCF20 (System.Console.WriteLine(System.String), mdToken: 06000993)     00280126 90               nop     00280127 8BE5             mov         esp,ebp     00280127 8BE5             \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0430 \u043a\u0442\u043e-\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0447\u0442\u043e \u0442\u0443\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e?)     00280129 5D               pop         ebp     0028012A C3               ret     0028012B 8B0D3C213803     mov         ecx,dword ptr ds:[0338213Ch] (&quot;null&quot;)     00280131 E8EACD6561       call        618DCF20 (System.Console.WriteLine(System.String), mdToken: 06000993)     00280136 90               nop     00280137 8BE5             mov         esp,ebp     00280139 5D               pop         ebp     0028013A C3               ret <\/code><\/pre>\n<p>  \u043f\u0440\u043e\u0442\u0438\u0432  <\/p>\n<pre><code>002F0098 55               push        ebp 002F0099 8BEC             mov         ebp,esp 002F009B B924381900       mov         ecx,193824h (MT: ConsoleApplication11.Program+MyClass) 002F00A0 E827843362       call        626284CC (JitHelp: CORINFO_HELP_NEWFAST) 002F00A5 8BC8             mov         ecx,eax 002F00A7 FF1544381900     call        dword ptr ds:[00193844h] (ConsoleApplication11.Program+MyClass..ctor(), mdToken: 06000004) 002F00AD E892CE5E61       call        618DCF44 (System.Console.get_Out(), mdToken: 06000946) 002F00B2 8BC8             mov         ecx,eax 002F00B4 8B1538217803     mov         edx,dword ptr ds:[03782138h] (&quot;not null&quot;) 002F00BA 8B01             mov         eax,dword ptr [ecx] 002F00BC 8B403C           mov         eax,dword ptr [eax+3Ch] 002F00BF FF5010           call        dword ptr [eax+10h] 002F00C2 5D               pop         ebp 002F00C3 C3               ret <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u044d\u0442\u0438 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u043c\u0438 \u2014 \u0432\u0435\u0440\u0441\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f, \u0440\u0430\u0432\u043d\u043e \u043a\u0430\u043a \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 JIT-\u0430 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 (\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432-\u0442\u043e \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0445 \u043d\u0435\u0442).<br \/>  \u0412 \u0446\u0435\u043b\u043e\u043c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 (\u0438 \u0435\u0451 \u043a\u043e\u0440\u043d\u0438) \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0443 <a href=\"http:\/\/sergeyteplyakov.blogspot.ru\/2013\/08\/blog-post_27.html\">\u0421\u0435\u0440\u0433\u0435\u044f \u0422\u0435\u043f\u043b\u044f\u043a\u043e\u0432\u0430<\/a>) \u0432 \u0431\u043b\u043e\u0433\u0435.  <\/div>\n<\/div>\n<h4>\u0417\u0430\u0434\u0430\u0447\u0430 5<\/h4>\n<p>  \u0427\u0435\u043c\u0443 \u0440\u0430\u0432\u043d\u043e j?  <\/p>\n<pre><code>Int32 i = Int32.MinValue; Int32 j = -i; <\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0438 \u043e\u0442\u0432\u0435\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\u041a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 checked \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0432\u044b\u0434\u0430\u0441\u0442 \u044d\u043a\u0441\u0435\u043f\u0448\u0435\u043d. \u0412 unckecked \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <strong>Int32.MinValue<\/strong>. \u041f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0442\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0437\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0442\u0438\u043f\u044b.<br \/>  \u041d\u0430\u043f\u043e\u043c\u043d\u044e \u0447\u0442\u043e \u0441\u0442\u0430\u0440\u0448\u0438\u0439 \u0431\u0438\u0442 \u0442\u0430\u043c \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0437\u043d\u0430\u043a. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u0431\u0430\u0439\u0442\u0430 127+1 = 128, 128 = 0x80 \u0438 \u0432 \u0437\u043d\u0430\u043a\u043e\u0432\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u044d\u0442\u043e -128.<br \/>  \u0418\u043b\u0438 \u0432 \u0431\u0438\u0442\u0430\u0445:<br \/>  -128 = 1000 0000<br \/>  127 = 0111 1111<br \/>  -1 = 1111 1111<br \/>  \u0432\u0441\u043f\u043e\u043c\u0438\u043d\u0430\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.  <\/div>\n<\/div>\n<h4>\u0417\u0430\u0434\u0430\u0447\u0430 6<\/h4>\n<p>  \u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u0432 C# &quot;\u043f\u043e\u043a\u043e\u0432\u044b\u0440\u044f\u0442\u044c&quot; \u043f\u0430\u043c\u044f\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u043d\u0435 \u0432\u044b\u0434\u0435\u043b\u044f\u043b\u0438*?<br \/>  *) \u043d\u0443 \u0438\u043b\u0438 \u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 (\u043d\u043e \u043d\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c) \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430?  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0438 \u043e\u0442\u0432\u0435\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\u041d\u0443 \u0432\u043e\u043e\u0431\u0449\u0435 \u043c\u043e\u0436\u043d\u043e.  <\/p>\n<pre><code> using System.Runtime.InteropServices;   class ArrayLength {     public int Length; }    [StructLayout(LayoutKind.Explicit)] class MyArray  {      [FieldOffset(0)]      public ArrayLength ArrayLength;       [FieldOffset(0)]      public byte[] Array = new byte[4];  }  internal class Program {     private static void Main(string[] args)     {         var arr = new MyArray();         arr.ArrayLength.Length = 1024;     } } <\/code><\/pre>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0445\u0438\u0442\u0440\u044b\u0435 \u0444\u043e\u043a\u0443\u0441\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438 \u2014 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0437\u043d\u0430\u0442\u044c \u043a\u0430\u043a \u043e\u043d\u0438 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435, \u0430 \u0441 \u044d\u0442\u0438\u043c \u0432\u0430\u043c \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 windbg.  <\/div>\n<\/div>\n<div class=\"clear\"><\/div>\n<\/p><\/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=\"http:\/\/habrahabr.ru\/post\/209008\/\"> http:\/\/habrahabr.ru\/post\/209008\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u041f\u043e\u0447\u0438\u0442\u0430\u0432 <a href=\"http:\/\/habrahabr.ru\/post\/208870\/\">10 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0437\u0430\u0434\u0430\u0447 \u043d\u0430 c# \u0441 \u043f\u043e\u0434\u0432\u043e\u0445\u043e\u043c<\/a> \u044f \u043e\u0433\u043e\u0440\u0447\u0438\u043b\u0441\u044f \u0442.\u043a. \u043f\u043e \u0441\u0443\u0442\u0438 \u0441\u0432\u043e\u0435\u0439 \u0442\u0430\u043c \u0438 \u043f\u043e\u0434\u0432\u043e\u0445\u043e\u0432-\u0442\u043e \u043d\u0435 \u0431\u044b\u043b\u043e \u043e\u0441\u043e\u0431\u043e (\u044d\u0442\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u0434\u043e &quot;\u0447\u0435\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u043e i++ + ++i&quot;)\u2026 \u041f\u043e\u0441\u0435\u043c\u0443 \u0440\u0435\u0448\u0438\u043b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0432\u0441\u043f\u043e\u043c\u0438\u043d\u0430\u0442\u044c \u043f\u043e\u0434\u0432\u043e\u0445\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u0432\u0438\u0434\u0435\u0442\u044c \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u0432 \u0436\u0438\u0437\u043d\u0438 8-). \u0423\u0440\u043e\u0432\u0435\u043d\u044c \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 middle \u043d\u0430\u0432\u0435\u0440\u043d\u043e.<\/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-209008","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/209008","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=209008"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/209008\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=209008"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=209008"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=209008"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}