{"id":293070,"date":"2019-08-07T09:00:22","date_gmt":"2019-08-07T09:00:22","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=293070"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=293070","title":{"rendered":"WinForms: \u043e\u0448\u0438\u0431\u043a\u0438, \u0425\u043e\u043b\u043c\u0441"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/71b\/aeb\/a84\/71baeba847a8865aef0cc8148effbb8c.png\" alt=\"Picture 5\"><\/div>\n<p>  \u041c\u044b \u043b\u044e\u0431\u0438\u043c \u0438\u0441\u043a\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 Microsoft. \u041f\u043e\u0447\u0435\u043c\u0443? \u0412\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e: \u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u044b, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c (\u0440\u0430\u0431\u043e\u0442\u0443 \u043c\u043e\u0436\u043d\u043e \u0432\u0435\u0441\u0442\u0438 \u0441\u0440\u0430\u0437\u0443 \u0432 \u0441\u0440\u0435\u0434\u0435 Visual Studio, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0443 PVS-Studio \u0435\u0441\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d) \u0438 \u043e\u043d\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043c\u0430\u043b\u043e \u043e\u0448\u0438\u0431\u043e\u043a. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u0442\u0430\u043a\u043e\u0439: \u043d\u0430\u0439\u0442\u0438 \u0438 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043e\u0442 MS; \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0435\u0433\u043e; \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438; \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0438\u0445 \u043d\u0435\u043c\u043d\u043e\u0433\u043e; \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e, \u043d\u0435 \u0437\u0430\u0431\u044b\u0432 \u043f\u043e\u0445\u0432\u0430\u043b\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432. \u0412\u0435\u043b\u0438\u043a\u043e\u043b\u0435\u043f\u043d\u043e! Win-win-win: \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0443\u0448\u043b\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e, \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u0440\u0430\u0434\u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044e \u043d\u043e\u0432\u044b\u0445 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432 \u0432 \u0431\u043b\u043e\u0433\u0435, \u0434\u0430 \u0438 \u043a\u0430\u0440\u043c\u0430 \u0432 \u043f\u043e\u043b\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435. \u041d\u043e \u0432 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 Windows Forms \u0438 \u0441\u0442\u043e\u0438\u0442 \u043b\u0438 \u0445\u0432\u0430\u043b\u0438\u0442\u044c Microsoft \u0432 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437.<br \/>  <a name=\"habracut\"><\/a><br \/>  <b>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/b><\/p>\n<p>  \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u0434\u0435\u043a\u0430\u0431\u0440\u044f 2018 \u0433\u043e\u0434\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Microsoft <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-net-core-3-preview-1-and-open-sourcing-windows-desktop-frameworks\/\">\u043e\u0431\u044a\u044f\u0432\u0438\u043b\u0430<\/a> \u043e \u0432\u044b\u043f\u0443\u0441\u043a\u0435 .NET Core 3 Preview 1. \u041d\u0435\u043c\u043d\u043e\u0433\u0438\u043c \u0440\u0430\u043d\u0435\u0435 (\u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u044b \u043e\u043a\u0442\u044f\u0431\u0440\u044f) \u043d\u0430 GitHub \u043d\u0430\u0447\u0430\u043b\u0430\u0441\u044c \u0430\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u043f\u043e \u043e\u0431\u043d\u0430\u0440\u043e\u0434\u043e\u0432\u0430\u043d\u0438\u044e \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 <a href=\"https:\/\/github.com\/dotnet\/winforms\">Windows Forms<\/a> \u2014 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b .NET Core UI \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 Windows. \u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/github.com\/dotnet\/winforms\/graphs\/commit-activity\">\u0442\u0443\u0442<\/a>. \u0421\u0435\u0439\u0447\u0430\u0441 \u043b\u044e\u0431\u043e\u0439 \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0439 \u043c\u043e\u0436\u0435\u0442 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 WinForms \u0434\u043b\u044f \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u042f \u0442\u043e\u0436\u0435 \u0441\u043a\u0430\u0447\u0430\u043b \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0438\u0441\u043a\u0430\u0442\u044c \u0442\u0430\u043c \u043e\u0448\u0438\u0431\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PVS-Studio. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0435 \u0432\u044b\u0437\u0432\u0430\u043b\u0430 \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u0435\u043d\u0438\u0439. \u041f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0438\u0441\u044c: Visual Studio 2019, .NET Core 3.0 SDK Preview, PVS-Studio. \u0418 \u0432\u043e\u0442 \u043b\u043e\u0433 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d.<\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u0432 \u043b\u043e\u0433 PVS-Studio, \u044f \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u044e \u0435\u0433\u043e \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043d\u0438\u044f \u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a (\u043e\u043a\u043d\u043e \u0441 \u043b\u043e\u0433\u043e\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 PVS-Studio \u0432 \u0441\u0440\u0435\u0434\u0435 Visual Studio \u0438\u043c\u0435\u0435\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0441\u043f\u0438\u0441\u043a\u0430). \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438 \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a, \u0447\u0442\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u044f \u043e\u0442\u043c\u0435\u0447\u0430\u044e \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u00ab\u0437\u0432\u0435\u0437\u0434\u043e\u0447\u043a\u043e\u0439\u00bb, \u0430 \u0443\u0436\u0435 \u043f\u043e\u0442\u043e\u043c, \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0432 \u0432\u0435\u0441\u044c \u043b\u043e\u0433, \u0432\u044b\u043f\u0438\u0441\u044b\u0432\u0430\u044e \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u0434\u0430 \u0438 \u0434\u0435\u043b\u0430\u044e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435. \u0410 \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u0448\u0438\u0431\u043e\u043a \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e, \u044f \u043f\u0435\u0440\u0435\u043c\u0435\u0448\u0438\u0432\u0430\u044e \u0438\u0445, \u0441\u0442\u0430\u0440\u0430\u044f\u0441\u044c \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0441\u0430\u043c\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0438 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438. \u041d\u043e \u0432 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043c\u043d\u043e\u0433\u043e\u0432\u0430\u0442\u043e (\u044d\u0445, \u0434\u043e\u043b\u0433\u043e \u0438\u043d\u0442\u0440\u0438\u0433\u0443 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c), \u0438 \u044f \u0431\u0443\u0434\u0443 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u0438\u0445 \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443 \u043d\u043e\u043c\u0435\u0440\u043e\u0432 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a. <\/p>\n<p>  \u0427\u0442\u043e \u0436\u0435 \u043d\u0430\u0448\u043b\u043e\u0441\u044c? 833 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0443\u0440\u043e\u0432\u043d\u044f \u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u043d\u043e\u0441\u0442\u0438 High \u0438 Medium (249 \u0438 584, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e) \u0431\u044b\u043b\u0438 \u0432\u044b\u0434\u0430\u043d\u044b \u0434\u043b\u044f 540 000 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430 (\u0431\u0435\u0437 \u0443\u0447\u0435\u0442\u0430 \u043f\u0443\u0441\u0442\u044b\u0445) \u0432 1670 \u0444\u0430\u0439\u043b\u0430\u0445 cs. \u0418 \u0434\u0430, \u043f\u043e \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u0438 \u044f \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b \u0442\u0435\u0441\u0442\u044b \u0438 \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0443\u0440\u043e\u0432\u043d\u044f \u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u043d\u043e\u0441\u0442\u0438 Low (\u0438\u0445 \u0431\u044b\u043b\u043e \u0432\u044b\u0434\u0430\u043d\u043e 215). \u041f\u043e \u043c\u043e\u0438\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f\u043c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u043c\u043d\u043e\u0433\u043e\u0432\u0430\u0442\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043e\u0442 MS. \u041d\u043e \u043d\u0435 \u0432\u0441\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438.<\/p>\n<p>  \u0414\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0447\u0438\u0441\u043b\u043e \u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u043e\u043a\u043e\u043b\u043e 30%. \u0415\u0449\u0451 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432 20% \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0441\u043c\u043e\u0433 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e\u0447\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 \u043e \u0442\u043e\u043c, \u043e\u0448\u0438\u0431\u043a\u0430 \u044d\u0442\u043e \u0438\u043b\u0438 \u043d\u0435\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u0437\u043d\u0430\u043a\u043e\u043c \u0441 \u043a\u043e\u0434\u043e\u043c. \u041d\u0443 \u0438 \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 20% \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0445 \u043c\u043d\u043e\u044e \u043e\u0448\u0438\u0431\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u0447\u0435\u0441\u043a\u0438\u0439 \u0444\u0430\u043a\u0442\u043e\u0440: \u0441\u043f\u0435\u0448\u043a\u0430, \u0443\u0441\u0442\u0430\u043b\u043e\u0441\u0442\u044c \u0438 \u0442.\u043f. \u0412\u043e\u0437\u043c\u043e\u0436\u0435\u043d, \u043a\u0441\u0442\u0430\u0442\u0438, \u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442: \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u044b\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f, \u0447\u0438\u0441\u043b\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0433\u043b\u043e \u0434\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u0434\u043e 70-80, \u044f \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b \u0447\u0435\u0440\u0435\u0437 \u043e\u0434\u043d\u043e, \u0447\u0442\u043e \u0438\u0437\u0440\u0435\u0434\u043a\u0430 \u043c\u043e\u0433\u043b\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0446\u0438\u0444\u0440\u0443 \u043e\u0448\u0438\u0431\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043b \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u043c\u0438.<\/p>\n<p>  \u0412 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, 30% \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438, \u0447\u0442\u043e \u0432\u0435\u0441\u044c\u043c\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u043d\u0442, \u0435\u0441\u043b\u0438 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0447\u0438\u0441\u043b\u043e \u043e\u0448\u0438\u0431\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c, \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u043e\u043a\u043e\u043b\u043e 240, \u0447\u0442\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438. \u041f\u043e\u0432\u0442\u043e\u0440\u044e\u0441\u044c, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043e\u0442 MS \u044d\u0442\u043e \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u0432\u044b\u0434\u0430\u044e\u0449\u0438\u0439\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 (\u0445\u043e\u0442\u044f \u044d\u0442\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u0432\u0441\u0435\u0433\u043e 0.44 \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0430 1000 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430), \u0434\u0430 \u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u043a\u043e\u0434\u0435 WinForms, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0431\u043e\u043b\u044c\u0448\u0435. \u041e \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u0445 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438, \u0430 \u0441\u0435\u0439\u0447\u0430\u0441 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u0430\u043c\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438.<\/p>\n<p>  <b>\u041e\u0448\u0438\u0431\u043a\u0438<\/b><\/p>\n<p>  PVS-Studio: <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3003\/\">V3003<\/a> The use of &#8216;if (A) {&#8230;} else if (A) {&#8230;}&#8217; pattern was detected. There is a probability of logical error presence. Check lines: 213, 224. ButtonStandardAdapter.cs 213  <\/p>\n<pre><code class=\"cpp\">void PaintWorker(PaintEventArgs e, bool up, CheckState state) {   up = up &amp;&amp; state == CheckState.Unchecked;   ....   if (up &amp; IsHighContrastHighlighted())   {     ....   }   else if (up &amp; IsHighContrastHighlighted())   {     ....   }   else   {     ....   }   .... }<\/code><\/pre>\n<p>  \u0412 \u0431\u043b\u043e\u043a\u0430\u0445 <i>if <\/i> \u0438 <i>else if<\/i> \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a copy-paste. \u041e\u0448\u0438\u0431\u043a\u0430 \u043b\u0438 \u044d\u0442\u043e? \u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 <i>IsHighContrastHighlighted<\/i>, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0441\u043e\u043c\u043d\u0435\u043d\u0438\u0435:  <\/p>\n<pre><code class=\"cpp\">protected bool IsHighContrastHighlighted() {   return SystemInformation.HighContrast &amp;&amp;      Application.RenderWithVisualStyles &amp;&amp;     (Control.Focused || Control.MouseIsOver ||        (Control.IsDefault &amp;&amp; Control.Enabled)); }<\/code><\/pre>\n<p>  \u041c\u0435\u0442\u043e\u0434, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043c\u043e\u0436\u0435\u0442 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u0430\u0445. \u0410 \u0442\u043e, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0432 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u0435, \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0441\u0442\u0440\u0430\u043d\u043d\u043e, \u043d\u043e \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0430\u0432\u043e \u043d\u0430 \u0436\u0438\u0437\u043d\u044c. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u044f \u0431\u044b \u043f\u043e\u0441\u043e\u0432\u0435\u0442\u043e\u0432\u0430\u043b \u0430\u0432\u0442\u043e\u0440\u0430\u043c \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430. \u041d\u0430 \u0432\u0441\u044f\u043a\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439. \u0410 \u0435\u0449\u0451, \u044d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0441\u043b\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434\u044b, \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044f \u043c\u0430\u043b\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439 \u043a\u043e\u0434.<\/p>\n<p>  PVS-Studio: <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3004\/\">V3004<\/a> The &#8216;then&#8217; statement is equivalent to the &#8216;else&#8217; statement. RichTextBox.cs 1018  <\/p>\n<pre><code class=\"cpp\">public int SelectionCharOffset {   get   {     int selCharOffset = 0;     ....     NativeMethods.CHARFORMATA cf = GetCharFormat(true);     \/\/ if the effects member contains valid info     if ((cf.dwMask &amp; RichTextBoxConstants.CFM_OFFSET) != 0)     {       selCharOffset = cf.yOffset;  \/\/ &lt;=     }     else     {       \/\/ The selection contains characters of different offsets,       \/\/ so we just return the offset of the first character.       selCharOffset = cf.yOffset;  \/\/ &lt;=     }     ....   }   .... }<\/code><\/pre>\n<p>  \u0410 \u0442\u0443\u0442 \u0442\u043e\u0447\u043d\u043e \u0434\u043e\u043f\u0443\u0449\u0435\u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 copy-paste. \u041d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0443\u0441\u043b\u043e\u0432\u0438\u044f, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <i>selCharOffset<\/i> \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u0412 \u043a\u043e\u0434\u0435 WinForms \u043d\u0430\u0448\u043b\u0438\u0441\u044c \u0435\u0449\u0451 \u0434\u0432\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438:<\/p>\n<ul>\n<li>V3004 The &#8216;then&#8217; statement is equivalent to the &#8216;else&#8217; statement. SplitContainer.cs 1700<\/li>\n<li>V3004 The &#8216;then&#8217; statement is equivalent to the &#8216;else&#8217; statement. ToolstripProfessionalRenderer.cs 371<\/li>\n<\/ul>\n<p>  PVS-Studio: <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3008\/\">V3008<\/a> The variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 681, 680. ProfessionalColorTable.cs 681  <\/p>\n<pre><code class=\"cpp\">internal void InitSystemColors(ref Dictionary&lt;KnownColors, Color&gt; rgbTable) {   ....   rgbTable[ProfessionalColorTable.KnownColors.msocbvcrCBBdrOuterDocked] =      buttonFace;   rgbTable[ProfessionalColorTable.KnownColors.msocbvcrCBBdrOuterDocked] =     buttonShadow;   .... }<\/code><\/pre>\n<p>  \u0412 \u043c\u0435\u0442\u043e\u0434\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u0441\u043b\u043e\u0432\u0430\u0440\u044c <i>rgbTable<\/i>. \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0443\u043a\u0430\u0437\u0430\u043b \u043d\u0430 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430, \u0433\u0434\u0435 \u0434\u0432\u0430\u0436\u0434\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0438\u0448\u0443\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0438 \u0442\u043e\u043c\u0443 \u0436\u0435 \u043a\u043b\u044e\u0447\u0443. \u0418 \u0432\u0441\u0451 \u0431\u044b \u043d\u0438\u0447\u0435\u0433\u043e, \u043d\u043e \u0442\u0430\u043a\u0438\u0445 \u043c\u0435\u0441\u0442 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435 \u043d\u0430\u0448\u043b\u043e\u0441\u044c \u0435\u0449\u0451 16. \u042d\u0442\u043e \u0443\u0436\u0435 \u043d\u0435 \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443. \u041d\u043e \u0432\u043e\u0442 \u0437\u0430\u0447\u0435\u043c \u0442\u0430\u043a \u0434\u0435\u043b\u0430\u044e\u0442, \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0433\u0430\u0434\u043a\u043e\u0439. \u041f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0430\u0432\u0442\u043e\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u044f \u043d\u0435 \u043d\u0430\u0448\u0435\u043b. \u0412 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/006\/f68\/827\/006f688275da3701f28abe7918835ce9.png\" alt=\"Picture 3\"><\/div>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u0435\u0440\u0432\u044b\u0435 \u0434\u0435\u0441\u044f\u0442\u044c \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 \u0441\u043f\u0438\u0441\u043a\u043e\u043c:<\/p>\n<ol>\n<li>V3008 The variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 785, 784. ProfessionalColorTable.cs 785<\/li>\n<li>V3008 The variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 787, 786. ProfessionalColorTable.cs 787<\/li>\n<li>V3008 The variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 789, 788. ProfessionalColorTable.cs 789<\/li>\n<li>V3008 The variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 791, 790. ProfessionalColorTable.cs 791<\/li>\n<li>V3008 The variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 797, 796. ProfessionalColorTable.cs 797<\/li>\n<li>V3008 The variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 799, 798. ProfessionalColorTable.cs 799<\/li>\n<li>V3008 The variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 807, 806. ProfessionalColorTable.cs 807<\/li>\n<li>V3008 The variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 815, 814. ProfessionalColorTable.cs 815<\/li>\n<li>V3008 The variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 817, 816. ProfessionalColorTable.cs 817<\/li>\n<li>V3008 The variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 823, 822. ProfessionalColorTable.cs 823<\/li>\n<\/ol>\n<p>  PVS-Studio: <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3011\/\">V3011<\/a> Two opposite conditions were encountered. The second condition is always false. Check lines: 5242, 5240. DataGrid.cs 5242  <\/p>\n<pre><code class=\"cpp\">private void CheckHierarchyState() {   if (checkHierarchy &amp;&amp; listManager != null &amp;&amp; myGridTable != null)   {     if (myGridTable == null)  \/\/ &lt;=     {       \/\/ there was nothing to check       return;     }      for (int j = 0; j &lt; myGridTable.GridColumnStyles.Count; j++)     {       DataGridColumnStyle gridColumn = myGridTable.GridColumnStyles[j];     }     checkHierarchy = false;     } }<\/code><\/pre>\n<p>  \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <i>return<\/i> \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0443\u0441\u043b\u043e\u0432\u0438\u0435 <i>myGridTable != null<\/i> \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u043c \u0431\u043b\u043e\u043a\u0435 <i>if<\/i> \u0431\u044b\u043b\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e \u043f\u043e\u0437\u0434\u043d\u0435\u0435 \u043f\u0440\u0438 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0435. \u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 <i>myGridTable == null<\/i> \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u0430. \u0414\u043b\u044f \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u043e\u0434\u0430 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443.<\/p>\n<p>  PVS-Studio: <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3019\/\">V3019<\/a> Possibly an incorrect variable is compared to null after type conversion using &#8216;as&#8217; keyword. Check variables &#8216;left&#8217;, &#8216;cscLeft&#8217;. TypeCodeDomSerializer.cs 611<\/p>\n<p>  PVS-Studio: <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3019\/\">V3019<\/a> Possibly an incorrect variable is compared to null after type conversion using &#8216;as&#8217; keyword. Check variables &#8216;right&#8217;, &#8216;cscRight&#8217;. TypeCodeDomSerializer.cs 615  <\/p>\n<pre><code class=\"cpp\">public int Compare(object left, object right) {   OrderedCodeStatementCollection cscLeft =      left as OrderedCodeStatementCollection;   OrderedCodeStatementCollection cscRight =      right as OrderedCodeStatementCollection;   if (left == null)   {     return 1;   }   else if (right == null)   {     return -1;   }   else if (right == left)   {     return 0;   }   return cscLeft.Order - cscRight.Order;  \/\/ &lt;= }<\/code><\/pre>\n<p>  \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u043b \u0441\u0440\u0430\u0437\u0443 \u0434\u0432\u0430 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u0430 <i>Compare<\/i>. \u0412 \u0447\u0451\u043c \u0436\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430? \u041e\u043d\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <i>cscLeft<\/i> \u0438 <i>cscRight<\/i> \u043d\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e <i>null<\/i>. \u0422\u0430\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043a \u0442\u0438\u043f\u0443 <i>OrderedCodeStatementCollection<\/i>. \u0422\u043e\u0433\u0434\u0430 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0438 <i>return <\/i> \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0430\u043d\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435. \u0422\u0430\u043a\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430, \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0434\u043b\u044f <i>left <\/i> \u0438 <i>right <\/i> \u043f\u0440\u043e\u0439\u0434\u0443\u0442 \u0438 \u043d\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0443\u0442 \u043a \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c\u0443 \u0432\u044b\u0445\u043e\u0434\u0443 \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u0430.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u0434, \u0432\u0435\u0437\u0434\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <i>cscLeft<\/i>\/<i>cscRight<\/i> \u0432\u043c\u0435\u0441\u0442\u043e <i>left<\/i>\/<i>right<\/i>.<\/p>\n<p>  PVS-Studio: <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3020\/\">V3020<\/a> An unconditional &#8216;break&#8217; within a loop. SelectionService.cs 421  <\/p>\n<pre><code class=\"cpp\">void ISelectionService.SetSelectedComponents(   ICollection components, SelectionTypes selectionType) {   ....   \/\/ Handle the click case   object requestedPrimary = null;   int primaryIndex;      if (fPrimary &amp;&amp; 1 == components.Count)   {     foreach (object o in components)     {       requestedPrimary = o;       if (o == null)       {           throw new ArgumentNullException(nameof(components));       }       break;     }   }   ....             }<\/code><\/pre>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f, \u0441\u043a\u043e\u0440\u0435\u0435, \u043a \u043a\u043e\u0434\u0443 \u00ab\u0441 \u0437\u0430\u043f\u0430\u0445\u043e\u043c\u00bb. \u041e\u0448\u0438\u0431\u043a\u0438 \u0442\u0443\u0442 \u043d\u0435\u0442. \u041d\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u043a \u0441\u043f\u043e\u0441\u043e\u0431\u0443 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0446\u0438\u043a\u043b\u0430 <i>foreach<\/i>. \u0417\u0430\u0447\u0435\u043c \u043e\u043d \u0442\u0443\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0441\u044f \u2014 \u043f\u043e\u043d\u044f\u0442\u043d\u043e: \u0438\u0437-\u0437\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u0430\u043a <i>ICollection<\/i>. \u041d\u043e \u0437\u0430\u0447\u0435\u043c \u0432 \u0446\u0438\u043a\u043b\u0435, \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u043e\u043c \u043d\u0430 \u043e\u0434\u043d\u043e\u043a\u0440\u0430\u0442\u043d\u0443\u044e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044e (\u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u0435\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 <i>components<\/i> \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430), \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0434\u0441\u0442\u0440\u0430\u0445\u043e\u0432\u043a\u0430 \u0432 \u0432\u0438\u0434\u0435 <i>break<\/i>? \u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u043e\u0442\u0432\u0435\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c: \u00ab\u0422\u0430\u043a \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043b\u043e\u0436\u0438\u043b\u043e\u0441\u044c\u00bb. \u041a\u043e\u0434 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0435\u043a\u0440\u0430\u0441\u0438\u0432\u043e.<\/p>\n<p>  PVS-Studio: <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3022\/\">V3022<\/a> Expression &#8216;ocxState != null&#8217; is always true. AxHost.cs 2186  <\/p>\n<pre><code class=\"cpp\">public State OcxState {   ....   set   {     ....     if (value == null)     {         return;     }     ....     ocxState = value;          if (ocxState != null)  \/\/ &lt;=     {       axState[manualUpdate] = ocxState._GetManualUpdate();       licenseKey = ocxState._GetLicenseKey();     }     else     {       axState[manualUpdate] = false;       licenseKey = null;     }      ....   } }<\/code><\/pre>\n<p>  \u0418\u0437-\u0437\u0430 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u00ab\u043c\u0435\u0440\u0442\u0432\u044b\u0439 \u043a\u043e\u0434\u00bb. \u0412\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u0431\u043b\u043e\u043a\u0435 <i>else <\/i> \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b.<\/p>\n<p>  PVS-Studio: <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3027\/\">V3027<\/a> The variable &#8216;e&#8217; was utilized in the logical expression before it was verified against null in the same logical expression. ImageEditor.cs 99  <\/p>\n<pre><code class=\"cpp\">public override object EditValue(....) {   ....   ImageEditor e = ....;   Type myClass = GetType();   if (!myClass.Equals(e.GetType()) &amp;&amp; e != null &amp;&amp;       myClass.IsInstanceOfType(e))   {     ....   }   .... }<\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <i>e <\/i> \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442 \u043d\u0430 \u043d\u0435\u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e <i>null<\/i>. \u041f\u0440\u0438\u0432\u0435\u0442, <i>NullReferenceException<\/i>.<\/p>\n<p>  \u0415\u0449\u0435 \u043e\u0434\u043d\u0430 \u043f\u043e\u0434\u043e\u0431\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430:<\/p>\n<p>  PVS-Studio: <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3027\/\">V3027<\/a> The variable &#8216;dropDownItem&#8217; was utilized in the logical expression before it was verified against null in the same logical expression. ToolStripMenuItemDesigner.cs 1351  <\/p>\n<pre><code class=\"cpp\">internal void EnterInSituEdit(ToolStripItem toolItem) {   ....   ToolStripDropDownItem dropDownItem = toolItem as ToolStripDropDownItem;   if (!(dropDownItem.Owner is ToolStripDropDownMenu) &amp;&amp;        dropDownItem != null &amp;&amp;        dropDownItem.Bounds.Width &lt; commitedEditorNode.Bounds.Width)   {     ....   }   .... }<\/code><\/pre>\n<p>  \u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0430\u044f \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439, \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <i>dropDownItem<\/i>. \u042f \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u0442\u0430\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043d\u0435\u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0435. \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0447\u0430\u0441\u0442\u044c \u0443\u0441\u043b\u043e\u0432\u0438\u044f <i>!(dropDownItem.Owner is ToolStripDropDownMenu)<\/i> \u0431\u044b\u043b\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u0432 \u043a\u043e\u0434 \u043f\u043e\u0437\u0436\u0435.<\/p>\n<p>  PVS-Studio: <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3030\/\">V3030<\/a> Recurring check. The &#8216;columnCount &gt; 0&#8217; condition was already verified in line 3900. ListView.cs 3903  <\/p>\n<pre><code class=\"cpp\">internal ColumnHeader InsertColumn(   int index, ColumnHeader ch, bool refreshSubItems) {   ....   \/\/ Add the column to our internal array   int columnCount = (columnHeaders == null ? 0 : columnHeaders.Length);   if (columnCount &gt; 0)   {     ColumnHeader[] newHeaders = new ColumnHeader[columnCount + 1];     if (columnCount &gt; 0)     {         System.Array.Copy(columnHeaders, 0, newHeaders, 0, columnCount);     }     ....   }   .... }<\/code><\/pre>\n<p>  \u041e\u0448\u0438\u0431\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0431\u0435\u0437\u043e\u0431\u0438\u0434\u043d\u043e\u0439. \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u0443 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u043d\u044f\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043b\u043e\u0433\u0438\u043a\u0443 \u0440\u0430\u0431\u043e\u0442\u044b. \u0410 \u0438\u043d\u043e\u0433\u0434\u0430 \u0442\u0430\u043a \u0434\u0430\u0436\u0435 \u0434\u0435\u043b\u0430\u044e\u0442, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u0430\u043a\u043e\u0433\u043e-\u043b\u0438\u0431\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043b\u0443\u0447\u0430\u044f \u0447\u0438\u0441\u043b\u043e \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435. \u0422\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u0442 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u0432\u0430\u0436\u0434\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442 <i>\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e<\/i> \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <i>columnCount<\/i>. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e. \u041b\u0438\u0431\u043e \u0445\u043e\u0442\u0435\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u043b\u0438\u0431\u043e \u0432 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043d\u0435 \u0442\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u0435.<\/p>\n<p>  PVS-Studio: <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3061\/\">V3061<\/a> Parameter &#8216;lprcClipRect&#8217; is always rewritten in method body before being used. WebBrowserSiteBase.cs 281  <\/p>\n<pre><code class=\"cpp\">int UnsafeNativeMethods.IOleInPlaceSite.GetWindowContext(   out UnsafeNativeMethods.IOleInPlaceFrame ppFrame,    out UnsafeNativeMethods.IOleInPlaceUIWindow ppDoc,   NativeMethods.COMRECT lprcPosRect,    NativeMethods.COMRECT lprcClipRect,   NativeMethods.tagOIFI lpFrameInfo) {   ppDoc = null;   ppFrame = Host.GetParentContainer();      lprcPosRect.left = Host.Bounds.X;   lprcPosRect.top = Host.Bounds.Y;   ....      lprcClipRect = WebBrowserHelper.GetClipRect();  \/\/ &lt;=   if (lpFrameInfo != null)   {     lpFrameInfo.cb = Marshal.SizeOf&lt;NativeMethods.tagOIFI&gt;();     lpFrameInfo.fMDIApp = false;     ....   }   return NativeMethods.S_OK; }<\/code><\/pre>\n<p>  \u041d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430. \u0414\u0430, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <i>lprcClipRect<\/i> \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0442 \u043d\u043e\u0432\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c, \u043d\u0438\u043a\u0430\u043a \u0435\u0433\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f. \u041d\u043e \u043a \u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u0432 \u0438\u0442\u043e\u0433\u0435? \u042f \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u0433\u0434\u0435-\u0442\u043e \u0432 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u043c \u043a\u043e\u0434\u0435 \u0441\u0441\u044b\u043b\u043a\u0430, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u0430\u044f \u0447\u0435\u0440\u0435\u0437 \u044d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u0445\u043e\u0442\u044f \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u043b\u0438 \u043d\u0435 \u0442\u0430\u043a. \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435. \u0414\u0430\u0436\u0435 \u0435\u0433\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 (\u043f\u0440\u0435\u0444\u0438\u043a\u0441 \u00abGet\u00bb) \u043d\u0430\u043c\u0435\u043a\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0430 \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b. \u0418 \u044d\u0442\u043e \u0442\u0430\u043a. \u041f\u0435\u0440\u0432\u044b\u0435 \u0434\u0432\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 (<i>ppFrame<\/i> \u0438 <i>ppDoc<\/i>) \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0441 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c <i>out<\/i> \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u043d\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0421\u0441\u044b\u043b\u043a\u0438 <i>lprcPosRect<\/i> \u0438 <i>lpFrameInfo <\/i> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043f\u043e\u043b\u044f\u043c \u043a\u043b\u0430\u0441\u0441\u0430 \u0438 \u0438\u0445 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u0418 \u0442\u043e\u043b\u044c\u043a\u043e <i>lprcClipRect<\/i> \u0432\u044b\u0431\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u043e\u0431\u0449\u0435\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430. \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 <i>out<\/i>, \u043b\u0438\u0431\u043e <i>ref<\/i>.<\/p>\n<p>  PVS-Studio: <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3066\/\">V3066<\/a> Possible incorrect order of arguments passed to &#8216;AdjustCellBorderStyle&#8217; method: &#8216;isFirstDisplayedRow&#8217; and &#8216;isFirstDisplayedColumn&#8217;. DataGridViewComboBoxCell.cs 1934  <\/p>\n<pre><code class=\"cpp\">protected override void OnMouseMove(DataGridViewCellMouseEventArgs e) {   ....   dgvabsEffective = AdjustCellBorderStyle(     DataGridView.AdvancedCellBorderStyle,     dgvabsPlaceholder,     singleVerticalBorderAdded,     singleHorizontalBorderAdded,     isFirstDisplayedRow,      \/\/ &lt;=     isFirstDisplayedColumn);  \/\/ &lt;=   .... }<\/code><\/pre>\n<p>  \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0437\u0430\u043f\u043e\u0434\u043e\u0437\u0440\u0438\u043b, \u0447\u0442\u043e \u0434\u0432\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0431\u044b\u043b\u0438 \u043f\u0435\u0440\u0435\u043f\u0443\u0442\u0430\u043d\u044b \u043c\u0435\u0441\u0442\u0430\u043c\u0438. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 <i>AdjustCellBorderStyle<\/i>:  <\/p>\n<pre><code class=\"cpp\">public virtual DataGridViewAdvancedBorderStyle AdjustCellBorderStyle(   DataGridViewAdvancedBorderStyledataGridViewAdvancedBorderStyleInput,   DataGridViewAdvancedBorderStyle dataGridViewAdvancedBorderStylePlaceholder,   bool singleVerticalBorderAdded,   bool singleHorizontalBorderAdded,   bool isFirstDisplayedColumn,   bool isFirstDisplayedRow) {   .... }<\/code><\/pre>\n<p>  \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a \u043e\u0448\u0438\u0431\u043a\u0430. \u0414\u0430, \u0447\u0430\u0441\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0443\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442 \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u043c\u0435\u043d\u044f\u0442\u044c \u043c\u0435\u0441\u0442\u0430\u043c\u0438 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435. \u041d\u043e \u044f \u043d\u0435 \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u044d\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439. \u041d\u0438\u0447\u0435\u0433\u043e \u0432 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u043c \u0438\u043b\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0430\u0445 \u043d\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u0430\u043a\u043e\u043c \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043f\u0435\u0440\u0435\u043f\u0443\u0442\u0430\u043d\u044b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u0430 <i>bool<\/i>. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0442\u0430\u043a\u0436\u0435 \u043e\u0431\u044b\u0447\u043d\u044b\u0435: \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u00abSwap\u00bb \u0438\u043b\u0438 \u00abReverse\u00bb. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435, \u0442\u0430\u043a \u043e\u0448\u0438\u0431\u0438\u0442\u044c\u0441\u044f \u043d\u0435 \u0442\u0430\u043a \u0443\u0436 \u0438 \u0441\u043b\u043e\u0436\u043d\u043e. \u041b\u044e\u0434\u0438 \u0447\u0430\u0441\u0442\u043e \u043f\u043e-\u0440\u0430\u0437\u043d\u043e\u043c\u0443 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u044b \u00ab\u0441\u0442\u0440\u043e\u043a\u0430\/\u0441\u0442\u043e\u043b\u0431\u0435\u0446\u00bb. \u0414\u043b\u044f \u043c\u0435\u043d\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0440\u0430\u0437 \u00ab\u0441\u0442\u0440\u043e\u043a\u0430\/\u0441\u0442\u043e\u043b\u0431\u0435\u0446\u00bb. \u0410 \u0432\u043e\u0442 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 <i>AdjustCellBorderStyle<\/i>, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u044b\u0439 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u2014 \u00ab\u0441\u0442\u043e\u043b\u0431\u0435\u0446\/\u0441\u0442\u0440\u043e\u043a\u0430\u00bb.<\/p>\n<p>  PVS-Studio: <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3070\/\">V3070<\/a> Uninitialized variable &#8216;LANG_USER_DEFAULT&#8217; is used when initializing the &#8216;LOCALE_USER_DEFAULT&#8217; variable. NativeMethods.cs 890  <\/p>\n<pre><code class=\"cpp\">internal static class NativeMethods {   ....   public static readonly int LOCALE_USER_DEFAULT =     MAKELCID(LANG_USER_DEFAULT);   public static readonly int LANG_USER_DEFAULT =      MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT);   .... }<\/code><\/pre>\n<p>  \u0420\u0435\u0434\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430. \u041f\u0435\u0440\u0435\u043f\u0443\u0442\u0430\u043d \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u0435\u0439 \u043a\u043b\u0430\u0441\u0441\u0430. \u0414\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044f <i>LOCALE_USER_DEFAULT<\/i> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043f\u043e\u043b\u0435 <i>LANG_USER_DEFAULT<\/i>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0435\u0449\u0451 \u043d\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0438 \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 0. \u041a\u0441\u0442\u0430\u0442\u0438, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <i>LANG_USER_DEFAULT <\/i> \u0434\u0430\u043b\u0435\u0435 \u0432 \u043a\u043e\u0434\u0435 \u043d\u0438\u0433\u0434\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f. \u042f \u043d\u0435 \u043f\u043e\u043b\u0435\u043d\u0438\u043b\u0441\u044f \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u0443\u0435\u0442 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e. \u0412\u043c\u0435\u0441\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u043a\u043e\u0434\u0435 WinForms, \u044f \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u043b \u0438\u0445 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f:  <\/p>\n<pre><code class=\"cpp\">internal static class NativeMethods {   public static readonly int LOCALE_USER_DEFAULT =      MAKELCID(LANG_USER_DEFAULT);   public static readonly int LANG_USER_DEFAULT =      MAKELANGID(0x00, 0x01);      public static int MAKELANGID(int primary, int sub)   {     return ((((ushort)(sub)) &lt;&lt; 10) | (ushort)(primary));   }   public static int MAKELCID(int lgid)   {     return MAKELCID(lgid, 0x0);   }   public static int MAKELCID(int lgid, int sort)   {     return ((0xFFFF &amp; lgid) | (((0x000f) &amp; sort) &lt;&lt; 16));   } } class Program {   static void Main()   {     System.Console.WriteLine(NativeMethods.LOCALE_USER_DEFAULT);   } }<\/code><\/pre>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043d\u0430 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u0435\u0434\u0435\u043d\u043e: 0. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043c\u0435\u043d\u044f\u0435\u043c \u043c\u0435\u0441\u0442\u0430\u043c\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0435\u0439 <i>LOCALE_USER_DEFAULT<\/i> \u0438 <i>LANG_USER_DEFAULT<\/i>. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0432 \u0442\u0430\u043a\u043e\u043c \u0432\u0438\u0434\u0435: 1024. \u0414\u0443\u043c\u0430\u044e, \u0431\u043e\u043b\u0435\u0435 \u0437\u0434\u0435\u0441\u044c \u043d\u0435\u0447\u0435\u0433\u043e \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>  PVS-Studio: <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3080\/\">V3080<\/a> Possible null dereference. Consider inspecting &#8216;ces&#8217;. CodeDomSerializerBase.cs 562  <\/p>\n<pre><code class=\"cpp\">protected void DeserializeStatement(   IDesignerSerializationManager manager, CodeStatement statement) {   ....   CodeExpressionStatement ces = statement as CodeExpressionStatement;   if (ces != null)   {     ....   }   else   {     ....     DeserializeExpression(manager, null, ces.Expression);  \/\/ &lt;=     ....   }   .... }<\/code><\/pre>\n<p>  \u041a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u00ab\u043f\u0430\u0434\u0430\u0442\u044c\u00bb \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e, \u0432\u0435\u0434\u044c \u0432 \u0432\u0435\u0442\u043a\u0443 <i>else <\/i> \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u043a\u0430\u043a \u0440\u0430\u0437 \u043f\u0440\u0438 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u0435 <i>null<\/i> \u0441\u0441\u044b\u043b\u043a\u0438 <i>ces<\/i>.<\/p>\n<p>  \u0415\u0449\u0451 \u043e\u0434\u0438\u043d \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>  PVS-Studio: <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3080\/\">V3080<\/a> Possible null dereference. Consider inspecting &#8216;comboBox&#8217;. ComboBox.cs 6610  <\/p>\n<pre><code class=\"cpp\">public void ValidateOwnerDrawRegions(ComboBox comboBox, ....) {   ....   if (comboBox != null)   { return; }   Rectangle topOwnerDrawArea =      new Rectangle(0, 0, comboBox.Width, innerBorder.Top);   .... }<\/code><\/pre>\n<p>  \u041f\u0430\u0440\u0430\u0434\u043e\u043a\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434. \u041f\u043e \u0432\u0441\u0435\u0439 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u043f\u0435\u0440\u0435\u043f\u0443\u0442\u0430\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443, \u043d\u0430\u043f\u0438\u0441\u0430\u0432 <i>if (comboBox != null)<\/i> \u0432\u043c\u0435\u0441\u0442\u043e <i>if (comboBox == null)<\/i>. \u0410 \u0442\u0430\u043a \u2014 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 <i>NullReferenceException<\/i>.<\/p>\n<p>  \u041c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u0434\u0432\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3080\/\">V3080<\/a>, \u0433\u0434\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438 \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u043c\u0435\u0442\u043e\u0434\u0430. \u041d\u043e \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3080\/\">V3080<\/a> \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0435\u0435 \u0438 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0438\u0441\u043a\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0434\u043b\u044f \u0446\u0435\u043f\u043e\u0447\u0435\u043a \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u043e\u0432. \u041d\u0435 \u0442\u0430\u043a \u0434\u0430\u0432\u043d\u043e \u043c\u044b \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0441\u0438\u043b\u0438\u043b\u0438 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b dataflow \u0438 \u043c\u0435\u0436\u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430. \u041f\u0440\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 &#171;<a href=\"https:\/\/www.viva64.com\/ru\/b\/0631\/\">Nullable Reference \u0442\u0438\u043f\u044b \u0432 C# 8.0 \u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437<\/a>&#171;. \u0410 \u0432\u043e\u0442 \u043f\u043e\u0434\u043e\u0431\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430, \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043d\u0430\u044f \u0432 WinForms:<\/p>\n<p>  PVS-Studio: <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3080\/\">V3080<\/a> Possible null dereference inside method at &#8216;reader.NameTable&#8217;. Consider inspecting the 1st argument: contentReader. ResXResourceReader.cs 267  <\/p>\n<pre><code class=\"cpp\">private void EnsureResData() {   ....   XmlTextReader contentReader = null;      try   {     if (fileContents != null)     {       contentReader = new XmlTextReader(....);     }     else if (reader != null)     {       contentReader = new XmlTextReader(....);     }     else if (fileName != null || stream != null)     {       ....         contentReader = new XmlTextReader(....);     }          SetupNameTable(contentReader);  \/\/ &lt;=     ....   }   finally   {     ....   }   .... }<\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <i>contentReader<\/i> \u0432 \u0442\u0435\u043b\u0435 \u043c\u0435\u0442\u043e\u0434\u0430. \u041f\u043e\u0441\u043b\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u043e\u0439, \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a, \u0441\u0441\u044b\u043b\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u0441\u0435\u0440\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u043d\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u0431\u043b\u043e\u043a\u043e\u043c <i>else<\/i>. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0432 \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u0440\u0435\u0434\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 (\u0438\u043b\u0438 \u0432\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c) \u0441\u0441\u044b\u043b\u043a\u0430 \u0432\u0441\u0435 \u0436\u0435 <b>\u043c\u043e\u0436\u0435\u0442<\/b> \u043e\u0441\u0442\u0430\u0442\u044c\u0441\u044f \u043d\u0443\u043b\u0435\u0432\u043e\u0439. \u0414\u0430\u043b\u0435\u0435 \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u0430 \u0432 \u043c\u0435\u0442\u043e\u0434 <i>SetupNameTable<\/i>, \u0433\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 \u0431\u0435\u0437 \u0432\u0441\u044f\u043a\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438:  <\/p>\n<pre><code class=\"cpp\">private void SetupNameTable(XmlReader reader) {   reader.NameTable.Add(ResXResourceWriter.TypeStr);   reader.NameTable.Add(ResXResourceWriter.NameStr);   .... }<\/code><\/pre>\n<p>  \u042d\u0442\u043e \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u043a\u043e\u0434.<\/p>\n<p>  \u0418 \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0430, \u0433\u0434\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0443 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u0439\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u0432\u044b\u0437\u043e\u0432\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u044f\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443:<\/p>\n<p>  PVS-Studio: <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3080\/\">V3080<\/a> Possible null dereference. Consider inspecting &#8216;layout&#8217;. DockAndAnchorLayout.cs 156  <\/p>\n<pre><code class=\"cpp\">private static Rectangle GetAnchorDestination(   IArrangedElement element, Rectangle displayRect, bool measureOnly) {   ....   AnchorInfo layout = GetAnchorInfo(element);    int left = layout.Left + displayRect.X;   .... }<\/code><\/pre>\n<p>  \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442, \u0447\u0442\u043e \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u0430 <i>GetAnchorInfo<\/i> \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0432\u044b\u0431\u0440\u043e\u0441\u0443 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <i>left<\/i>. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0439\u0434\u0435\u043c \u043f\u043e \u0432\u0441\u0435\u0439 \u0446\u0435\u043f\u043e\u0447\u043a\u0435 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0442\u0430\u043a \u043b\u0438 \u044d\u0442\u043e:  <\/p>\n<pre><code class=\"cpp\">private static AnchorInfo GetAnchorInfo(IArrangedElement element) {   return (AnchorInfo)element.Properties.GetObject(s_layoutInfoProperty); }  public object GetObject(int key) =&gt; GetObject(key, out _);  public object GetObject(int key, out bool found) {   short keyIndex = SplitKey(key, out short element);   if (!LocateObjectEntry(keyIndex, out int index))   {     found = false;     return null;   }      \/\/ We have found the relevant entry. See if   \/\/ the bitmask indicates the value is used.   if (((1 &lt;&lt; element) &amp; s_objEntries[index].Mask) == 0)   {     found = false;     return null;   }      found = true;   switch (element)   {     case 0:       return s_objEntries[index].Value1;     ....     default:       Debug.Fail(\"Invalid element obtained from LocateObjectEntry\");       return null;   } }<\/code><\/pre>\n<p>  \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0432 \u0440\u044f\u0434\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043c\u0435\u0442\u043e\u0434 <i>GetObject<\/i>, \u0437\u0430\u043c\u044b\u043a\u0430\u044e\u0449\u0438\u0439 \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u0432\u044b\u0437\u043e\u0432\u043e\u0432, \u0432\u0435\u0440\u043d\u0435\u0442 <i>null<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0435\u0437 \u0432\u0441\u044f\u043a\u0438\u0445 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d \u0432 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434. \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 <i>GetAnchorDestination<\/i> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e.<\/p>\n<p>  \u0412 \u043a\u043e\u0434\u0435 WinForms \u043d\u0430\u0448\u043b\u043e\u0441\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a, <b>\u0431\u043e\u043b\u0435\u0435 70<\/b>. \u041e\u043d\u0438 \u0432\u0441\u0435 \u043f\u043e\u0445\u043e\u0436\u0438 \u0438 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u0438\u0445 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<p>  PVS-Studio: <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3091\/\">V3091<\/a> Empirical analysis. It is possible that a typo is present inside the string literal: \u00abShowCheckMargin\u00bb. The &#8216;ShowCheckMargin&#8217; word is suspicious. PropertyNames.cs 136  <\/p>\n<pre><code class=\"cpp\">internal class PropertyNames {   ....   public static readonly string ShowImageMargin = \"ShowCheckMargin\";   ...   public static readonly string ShowCheckMargin = \"ShowCheckMargin\";   .... }<\/code><\/pre>\n<p>  \u0425\u043e\u0440\u043e\u0448\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u0448\u0438\u0431\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0435 \u0442\u0430\u043a-\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c. \u041f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u0435\u0439 \u043a\u043b\u0430\u0441\u0441\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0445\u043e\u0442\u044f \u0430\u0432\u0442\u043e\u0440 \u043a\u043e\u0434\u0430 \u044f\u0432\u043d\u043e \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u043b \u043d\u0435 \u0442\u0430\u043a (\u0432\u0438\u043d\u043e\u0432\u0430\u0442 copy-paste). \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0441\u0434\u0435\u043b\u0430\u043b \u0442\u0430\u043a\u043e\u0439 \u0432\u044b\u0432\u043e\u0434, \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0432 \u0438\u043c\u0435\u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0441\u0442\u0440\u043e\u043a. \u042f \u043f\u0440\u0438\u0432\u0435\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u043e\u043a\u0438 \u0441 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438, \u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 \u043a\u043e\u0434\u0430:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/313\/196\/4de\/3131964de8f3f5161678c44086ed2e40.png\" alt=\"Picture 2\"><\/div>\n<p>  \u0418\u043c\u0435\u043d\u043d\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u044e \u043c\u043e\u0449\u044c \u0438 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430.<\/p>\n<p>  PVS-Studio: <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3095\/\">V3095<\/a> The &#8216;currentForm&#8217; object was used before it was verified against null. Check lines: 3386, 3404. Application.cs 3386  <\/p>\n<pre><code class=\"cpp\">private void RunMessageLoopInner(int reason, ApplicationContext context) {   ....   hwndOwner = new HandleRef(     null,      UnsafeNativeMethods.GetWindowLong(       new HandleRef(currentForm, currentForm.Handle),  \/\/ &lt;=     NativeMethods.GWL_HWNDPARENT));   ....   if (currentForm != null &amp;&amp; ....)   .... }<\/code><\/pre>\n<p>  \u041a\u043b\u0430\u0441\u0441\u0438\u043a\u0430. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <i>currentForm <\/i> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0431\u0435\u0437 \u0432\u0441\u044f\u043a\u0438\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a. \u041d\u043e \u0434\u0430\u043b\u0435\u0435 \u0432 \u043a\u043e\u0434\u0435 \u0435\u0441\u0442\u044c \u0435\u0451 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e <i>null<\/i>. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0433\u0443 \u043f\u043e\u0441\u043e\u0432\u0435\u0442\u043e\u0432\u0430\u0442\u044c \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441\u043e \u0441\u0441\u044b\u043b\u043e\u0447\u043d\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b :).<\/p>\n<p>  \u0415\u0449\u0451 \u043e\u0434\u043d\u0430 \u043f\u043e\u0434\u043e\u0431\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430:<\/p>\n<p>  PVS-Studio: <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3095\/\">V3095<\/a> The &#8216;backgroundBrush&#8217; object was used before it was verified against null. Check lines: 2331, 2334. DataGrid.cs 2331  <\/p>\n<pre><code class=\"cpp\">public Color BackgroundColor {   ....   set   {     ....     if (!value.Equals(backgroundBrush.Color))  \/\/ &lt;=     {       if (backgroundBrush != null &amp;&amp;            BackgroundBrush != DefaultBackgroundBrush)       ....     }   } }<\/code><\/pre>\n<p>  \u0412 \u043a\u043e\u0434\u0435 WinForms \u043c\u043d\u0435 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u043b\u043e\u0441\u044c \u0435\u0449\u0435 <b>\u0431\u043e\u043b\u0435\u0435 60<\/b> \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a. \u041d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0432\u0441\u0435 \u043e\u043d\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u044b \u0438 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432. \u041d\u043e \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e \u043d\u0438\u0445 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0443\u0436\u0435 \u043d\u0435 \u0442\u0430\u043a \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0442\u0430\u043a \u0447\u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0443\u0441\u044c \u0434\u0432\u0443\u043c\u044f \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u043c\u0438 \u0432\u044b\u0448\u0435.<\/p>\n<p>  PVS-Studio: <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3125\/\">V3125<\/a> The &#8216;_propInfo&#8217; object was used and was verified against null in different execution branches. Check lines: 996, 982. Binding.cs 996  <\/p>\n<pre><code class=\"cpp\">private void SetPropValue(object value) {   ....   if (....)   {     if ....     else if (_propInfo != null) ....   }   else   {     _propInfo.SetValue(_control, value);   }   .... }<\/code><\/pre>\n<p>  \u0414\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0442\u044b \u043a\u0430\u0440\u0442\u0438\u043d\u044b \u2014 \u0442\u043e\u0436\u0435 \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u043e\u0434\u0430 \u043a\u043b\u0430\u0441\u0441\u0438\u043a\u0430, \u043e\u0448\u0438\u0431\u043a\u0430 <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3125\/\">V3125<\/a>. \u041e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043d\u0443\u043b\u0435\u0432\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e, \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0432 \u043d\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e <i>null<\/i>, \u0430 \u0432\u043e\u0442 \u0434\u0430\u043b\u0435\u0435 \u0432 \u043a\u043e\u0434\u0435 \u044d\u0442\u043e\u0433\u043e \u0443\u0436\u0435 \u043d\u0435 \u0434\u0435\u043b\u0430\u044e\u0442.<\/p>\n<p>  \u0418 \u0435\u0449\u0451 \u043e\u0434\u043d\u0430 \u043f\u043e\u0434\u043e\u0431\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430:<\/p>\n<p>  PVS-Studio: <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3125\/\">V3125<\/a> The &#8216;owner&#8217; object was used after it was verified against null. Check lines: 64, 60. FlatButtonAppearance.cs 64  <\/p>\n<pre><code class=\"cpp\">public int BorderSize {   ....   set   {     ....     if (owner != null &amp;&amp; owner.ParentInternal != null)     {         LayoutTransaction.DoLayoutIf(....);     }     owner.Invalidate();  \/\/ &lt;=     ....   } }<\/code><\/pre>\n<p>  \u041a\u0440\u0430\u0441\u043e\u0442\u0430. \u041d\u043e \u044d\u0442\u043e \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u0433\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0412\u0435\u0434\u044c \u043f\u043e\u043c\u0438\u043c\u043e \u044d\u0442\u0438\u0445 \u0434\u0432\u0443\u0445 <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3125\/\">V3125<\/a>, \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043d\u0430\u0448\u0435\u043b \u0435\u0449\u0435 <b>\u0431\u043e\u043b\u0435\u0435 50<\/b> \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432 \u0432 \u043a\u043e\u0434\u0435 WinForms. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0435\u0441\u0442\u044c \u043d\u0430\u0434 \u0447\u0435\u043c \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/p>\n<p>  \u0418 \u043d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a \u2014 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043e\u0448\u0438\u0431\u043a\u0430.<\/p>\n<p>  PVS-Studio: <a href=\"https:\/\/www.viva64.com\/ru\/w\/v3137\/\">V3137<\/a> The &#8216;hCurrentFont&#8217; variable is assigned but is not used by the end of the function. DeviceContext2.cs 241  <\/p>\n<pre><code class=\"cpp\">sealed partial class DeviceContext : .... {   WindowsFont selectedFont;   ....   internal void DisposeFont(bool disposing)   {     if (disposing)     {         DeviceContexts.RemoveDeviceContext(this);     }          if (selectedFont != null &amp;&amp; selectedFont.Hfont != IntPtr.Zero)     {       IntPtr hCurrentFont = IntUnsafeNativeMethods.GetCurrentObject(         new HandleRef(this, hDC), IntNativeMethods.OBJ_FONT);       if (hCurrentFont == selectedFont.Hfont)       {         \/\/ select initial font back in         IntUnsafeNativeMethods.SelectObject(new HandleRef(this, Hdc),           new HandleRef(null, hInitialFont));          hCurrentFont = hInitialFont;  \/\/ &lt;=       }              selectedFont.Dispose(disposing);       selectedFont = null;     }   }   .... }<\/code><\/pre>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0436\u0435 \u043d\u0430\u0441\u0442\u043e\u0440\u043e\u0436\u0438\u043b\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440, \u0438 \u043f\u043e\u0447\u0435\u043c\u0443 \u0442\u043e, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043d\u043e \u0434\u0430\u043b\u0435\u0435 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 \u043e\u043d\u043e \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u043c\u043e\u0436\u0435\u0442 \u0441\u0432\u0438\u0434\u0435\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435. <\/p>\n<p>  \u0412 \u0444\u0430\u0439\u043b\u0435 <i>DeviceContext2.cs<\/i> \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d partial-\u043a\u043b\u0430\u0441\u0441. \u041c\u0435\u0442\u043e\u0434 <i>DisposeFont<\/i> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043f\u043e\u0441\u043b\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0433\u0440\u0430\u0444\u0438\u043a\u043e\u0439: \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u0448\u0440\u0438\u0444\u0442\u044b. \u0414\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u044f \u043f\u0440\u0438\u0432\u0435\u043b \u043c\u0435\u0442\u043e\u0434 <i>DisposeFont<\/i> \u0446\u0435\u043b\u0438\u043a\u043e\u043c. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <i>hCurrentFont<\/i>. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 \u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 \u043a\u043b\u0430\u0441\u0441\u0430. \u042f \u043d\u0430\u0448\u0435\u043b \u0434\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 <i>DeviceContext<\/i>, \u0433\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f <b>\u043f\u043e\u043b\u0435<\/b> \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <i>hCurrentFont<\/i>:  <\/p>\n<pre><code class=\"cpp\">public IntPtr SelectFont(WindowsFont font) {   ....   hCurrentFont = font.Hfont;   .... } public void ResetFont() {   ....   hCurrentFont = hInitialFont; }<\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 \u043c\u0435\u0442\u043e\u0434 <i>ResetFont<\/i>. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0441\u0442\u0440\u043e\u0447\u043a\u0430 \u0442\u0430\u043c \u2014 \u044d\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u043e, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u044e\u0442 \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 <i>DisposeFont<\/i> \u0432\u043e \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u043c \u0431\u043b\u043e\u043a\u0435 <i>if <\/i>(\u043d\u0430 \u044d\u0442\u043e \u043c\u0435\u0441\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440). \u0410 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043e \u044d\u0442\u043e \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 <i>hCurrentFont<\/i> \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 partial-\u043a\u043b\u0430\u0441\u0441\u0430 \u0432 \u0444\u0430\u0439\u043b\u0435 <i>DeviceContext.cs<\/i>:  <\/p>\n<pre><code class=\"cpp\">sealed partial class DeviceContext : .... {   ....   IntPtr hInitialFont;   ....   IntPtr hCurrentFont;  \/\/ &lt;=   .... }<\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0434\u043e\u043f\u0443\u0449\u0435\u043d\u0430 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430. \u0414\u0440\u0443\u0433\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0432 \u0435\u0451 \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u0438. \u0421\u0435\u0439\u0447\u0430\u0441 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u0435\u0442\u043e\u0434\u0430 <i>DisposeFont <\/i> \u0432 \u0441\u0435\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u0430 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u043c \u00abselect initial font back in\u00bb, \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044e <i>hCurrentFont<\/i> \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u0414\u0443\u043c\u0430\u044e, \u0442\u043e\u0447\u043d\u044b\u0439 \u0432\u0435\u0440\u0434\u0438\u043a\u0442 \u043c\u043e\u0433\u0443\u0442 \u0434\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u0432\u0442\u043e\u0440\u044b \u043a\u043e\u0434\u0430.<\/p>\n<p>  <b>\u0412\u044b\u0432\u043e\u0434\u044b<\/b><\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0432 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u044f \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u00ab\u043f\u043e\u0440\u0443\u0433\u0430\u0442\u044c\u00bb MS. \u0412 WinForms \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043c\u043d\u043e\u0433\u043e\u0432\u0430\u0442\u043e \u043e\u0448\u0438\u0431\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u043f\u0440\u0438\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u0438\u043d\u043e\u0439 \u0442\u043e\u043c\u0443 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043f\u0435\u0448\u043a\u0430, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 MS \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0430\u0434 .NET Core 3 \u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438, \u0432\u043a\u043b\u044e\u0447\u0430\u044f WinForms. \u041d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043a\u043e\u0434 WinForms \u0435\u0449\u0451 \u00ab\u0441\u044b\u0440\u043e\u0432\u0430\u0442\u00bb, \u043d\u043e \u044f \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0441\u043a\u043e\u0440\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u043a \u043b\u0443\u0447\u0448\u0435\u043c\u0443.<\/p>\n<p>  \u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u043e\u0439 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u043e\u0448\u0438\u0431\u043e\u043a \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u0448 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0442\u0430\u043b \u043b\u0443\u0447\u0448\u0435 \u0438\u0445 \u0438\u0441\u043a\u0430\u0442\u044c :).<\/p>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438, \u0441\u043a\u043e\u0440\u043e \u0432\u044b\u0439\u0434\u0435\u0442 \u0441\u0442\u0430\u0442\u044c\u044f \u043c\u043e\u0435\u0433\u043e \u043a\u043e\u043b\u043b\u0435\u0433\u0438 \u0421\u0435\u0440\u0433\u0435\u044f \u0412\u0430\u0441\u0438\u043b\u044c\u0435\u0432\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043e\u043d \u0438\u0449\u0435\u0442 \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0432 \u043a\u043e\u0434\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a .NET Core. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u0441\u0442\u0432\u0443\u0435\u0442 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b .NET, \u0432\u0435\u0434\u044c \u043c\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u0442\u0430\u0440\u0430\u0435\u043c\u0441\u044f \u0434\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0434\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.<\/p>\n<p>  \u041d\u0443 \u0430 \u0442\u0435\u043c, \u043a\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u0443\u043b\u0443\u0447\u0448\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u044b \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u043b\u0438 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u043f\u043e\u0438\u0441\u043a\u0443 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u0447\u0443\u0436\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445, \u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e <a href=\"https:\/\/www.viva64.com\/ru\/pvs-studio-download\/\">\u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c<\/a> PVS-Studio.<\/p>\n<p>  \u0412\u0441\u0435\u043c \u0447\u0438\u0441\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430!<\/p>\n<p><a href=\"https:\/\/habr.com\/en\/company\/pvs-studio\/blog\/462809\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/c78\/30f\/70c\/c7830f70c5577c3d6704f254d7cad6a3.png\" align=\"left\"><\/a><\/p>\n<p>  \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: Sergey Khrenov. <a href=\"https:\/\/habr.com\/en\/company\/pvs-studio\/blog\/462809\/\">WinForms: Errors, Holmes<\/a><\/div>\n<p>               <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \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:\/\/habr.com\/ru\/company\/pvs-studio\/blog\/462807\/\"> https:\/\/habr.com\/ru\/company\/pvs-studio\/blog\/462807\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/71b\/aeb\/a84\/71baeba847a8865aef0cc8148effbb8c.png\" alt=\"Picture 5\"><\/div>\n<p>  \u041c\u044b \u043b\u044e\u0431\u0438\u043c \u0438\u0441\u043a\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 Microsoft. \u041f\u043e\u0447\u0435\u043c\u0443? \u0412\u0441\u0451 \u043f\u0440\u043e\u0441\u0442\u043e: \u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u044b, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c (\u0440\u0430\u0431\u043e\u0442\u0443 \u043c\u043e\u0436\u043d\u043e \u0432\u0435\u0441\u0442\u0438 \u0441\u0440\u0430\u0437\u0443 \u0432 \u0441\u0440\u0435\u0434\u0435 Visual Studio, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0443 PVS-Studio \u0435\u0441\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u043f\u043b\u0430\u0433\u0438\u043d) \u0438 \u043e\u043d\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043c\u0430\u043b\u043e \u043e\u0448\u0438\u0431\u043e\u043a. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u0442\u0430\u043a\u043e\u0439: \u043d\u0430\u0439\u0442\u0438 \u0438 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043e\u0442 MS; \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0435\u0433\u043e; \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438; \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0438\u0445 \u043d\u0435\u043c\u043d\u043e\u0433\u043e; \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e, \u043d\u0435 \u0437\u0430\u0431\u044b\u0432 \u043f\u043e\u0445\u0432\u0430\u043b\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432. \u0412\u0435\u043b\u0438\u043a\u043e\u043b\u0435\u043f\u043d\u043e! Win-win-win: \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0443\u0448\u043b\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e, \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u0440\u0430\u0434\u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044e \u043d\u043e\u0432\u044b\u0445 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432 \u0432 \u0431\u043b\u043e\u0433\u0435, \u0434\u0430 \u0438 \u043a\u0430\u0440\u043c\u0430 \u0432 \u043f\u043e\u043b\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435. \u041d\u043e \u0432 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u043d\u0435 \u0442\u0430\u043a. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u043a\u043e\u0434\u0435 Windows Forms \u0438 \u0441\u0442\u043e\u0438\u0442 \u043b\u0438 \u0445\u0432\u0430\u043b\u0438\u0442\u044c Microsoft \u0432 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437.  <\/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-293070","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/293070","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=293070"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/293070\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=293070"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=293070"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=293070"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}