{"id":1209,"date":"2016-10-12T01:40:49","date_gmt":"2016-10-11T21:40:49","guid":{"rendered":"http:\/\/blog.rc21net.ru\/?p=1209"},"modified":"2022-06-13T03:12:48","modified_gmt":"2022-06-12T23:12:48","slug":"csharp-tip-obekt-object-type","status":"publish","type":"post","link":"https:\/\/devkazakov.com\/ru\/blog\/csharp-tip-obekt-object-type\/","title":{"rendered":"C#: \u0442\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442 (Object Type)"},"content":{"rendered":"<p><strong><code>object<\/code> (<code>System.Object<\/code>)<\/strong> &#8212; \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0442\u0438\u043f\u043e\u0432. \u041b\u044e\u0431\u043e\u0439 \u0442\u0438\u043f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 (\u0441\u043a\u0440\u044b\u0442\u043e) \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043a \u0431\u0430\u0437\u043e\u0432\u043e\u043c\u0443 \u043a\u043b\u0430\u0441\u0441\u0443\u00a0(upcast)\u00a0<code>object<\/code>.<\/p>\n<p><!--more--><\/p>\n<p>\u042d\u0442\u0430 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre class=\"lang:c# decode:true \">public class Stack\n{\n    int position;\n    object[] data = new object[10];\n    public void Push (object o) { data[position++] = o; }\n    public object Pop() { return data[--position]; }\n}<\/pre>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 <code>Stack<\/code> \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0442\u0438\u043f\u043e\u043c <code>object<\/code>,\u00a0\u0432 \u043d\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c (<code>Push<\/code>) \u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c (<code>Pop<\/code>)\u00a0\u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b \u043b\u044e\u0431\u043e\u0433\u043e \u0442\u0438\u043f\u0430.<\/p>\n<p><code>object<\/code> &#8212;\u00a0\u0441\u0441\u044b\u043b\u043e\u0447\u043d\u044b\u0439 \u0442\u0438\u043f, \u043d\u043e \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u0435 \u0442\u0438\u043f\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043a \u0442\u0438\u043f\u0443 <code>object<\/code> (\u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0438\u0437 \u043d\u0435\u0433\u043e). \u0427\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c, CLR\u00a0\u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u044f\u0434 \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u0439, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u0442\u0440\u0430\u043d\u0438\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0441\u0441\u044b\u043b\u043e\u0447\u043d\u044b\u043c\u0438 \u0438 \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438. \u042d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <em>\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u043c\u0443 \u0442\u0438\u043f\u0443 (boxing) \u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430 (unboxing)<\/em>.<\/p>\n<h2><strong>\u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u043c\u0443 \u0442\u0438\u043f\u0443 (boxing)<\/strong>\u00a0\u0438\u00a0<strong>\u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430 (unboxing)<\/strong><\/h2>\n<p><strong>\u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u043c\u0443 \u0442\u0438\u043f\u0443 (boxing)<\/strong> &#8212; \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043a \u0441\u0441\u044b\u043b\u043e\u0447\u043d\u043e\u043c\u0443 \u0442\u0438\u043f\u0443. \u0421\u0441\u044b\u043b\u043e\u0447\u043d\u044b\u043c \u0442\u0438\u043f\u043e\u043c \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u0438\u0431\u043e \u043a\u043b\u0430\u0441\u0441 <code>object<\/code>, \u043b\u0438\u0431\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. <strong>\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u0430 (unboxing)<\/strong> &#8212; \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0435 <code>object\u00a0<\/code>\u043d\u0430\u0437\u0430\u0434\u00a0\u043a \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u043c\u0443 \u0442\u0438\u043f\u0443.<\/p>\n<pre class=\"lang:c# decode:true\">int x = 9;\nobject obj = x; \/\/ Boxing\nint y = (int)obj; \/\/ Unboxing<\/pre>\n<p>\u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u044f\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u0439 \u0442\u0438\u043f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0442\u0438\u043f\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0438 \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a \u0432\u044b\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f\u00a0<code>InvalidCastException<\/code>.<\/p>\n<pre class=\"lang:c# decode:true\">object obj = 9; \/\/ 9 - \u0442\u0438\u043f\u00a0int\nlong x = (long) obj; \/\/ InvalidCastException, \u0442.\u043a. int \u0438 long \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043d\u0435 \u0441\u043e\u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f\nlong x = (int) obj; \/\/ \u0410 \u0442\u0430\u043a \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\nobject obj = 3.5; \/\/ 3.5 - \u0442\u0438\u043f\u00a0double\nint x = (int) (double) obj; \/\/ x =\u00a03,\u00a0(double) \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f,\u00a0\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \/\/ (int) - \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a \u0442\u0438\u043f\u0443 int<\/pre>\n<p>\u041f\u0440\u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u043a \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u043c\u0443 \u0442\u0438\u043f\u0443 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0433\u043e \u0442\u0438\u043f\u00a0<strong>\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442\u0441\u044f<\/strong> \u0432 \u043d\u043e\u0432\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u0430 \u043f\u0440\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <strong>\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442\u0441\u044f<\/strong> \u043d\u0430\u0437\u0430\u0434 \u0432 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0433\u043e \u0442\u0438\u043f\u0430.<\/p>\n<pre class=\"lang:c# decode:true\">int i = 3;\nobject boxed = i;\ni = 5;\nConsole.WriteLine (boxed); \/\/ 3<\/pre>\n<h2>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0438\u043f\u0430<\/h2>\n<p>C#\u00a0\u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0442\u0438\u043f \u0434\u0432\u0430 \u0440\u0430\u0437\u0430: \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 (\u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438) \u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0438\u043f\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0431\u0435\u0437 \u0435\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u0442\u0438\u043f\u0430:<\/p>\n<pre class=\"lang:c# decode:true\">int x = \"5\";<\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0438\u043f\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u0440\u0435\u0434\u043e\u0439 CLR\u00a0\u043f\u0440\u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u043a \u0442\u0438\u043f\u0443 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 (downcast) \u0438 \u043f\u0440\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f (unboxing).<\/p>\n<pre class=\"lang:c# decode:true\">object y = \"5\";\nint z = (int) y; \/\/ \u041e\u0448\u0438\u0431\u043a\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438 downcast<\/pre>\n<h2>\u041c\u0435\u0442\u043e\u0434 GetType \u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u00a0typeof<\/h2>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0438\u043f\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0445\u0440\u0430\u043d\u0438\u0442 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u043c\u0430\u0440\u043a\u0435\u0440 \u0442\u0438\u043f\u0430. \u042d\u0442\u043e\u0442 \u043c\u0430\u0440\u043a\u0435\u0440 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0441\u0430\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c \u0442\u0438\u043f\u0430 <strong><code>System.Type<\/code><\/strong>.\u00a0\u0415\u0441\u0442\u044c \u0434\u0432\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u00a0<code>System.Type<\/code>:<\/p>\n<ul>\n<li>\u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u00a0<code>GetType<\/code>\u00a0\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u043e\u0433\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 (\u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f)<\/li>\n<li>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u00a0<code>typeof<\/code> \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0442\u0438\u043f\u0430 (\u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438)<\/li>\n<\/ul>\n<p>System.Type \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0432\u0435\u0449\u0435\u0439 \u043a\u0430\u043a \u0438\u043c\u044f \u0442\u0438\u043f\u0430, \u0441\u0431\u043e\u0440\u043a\u0430, \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0442\u0438\u043f \u0438 \u0442.\u0434., \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u044f\u0434 \u043c\u0435\u0442\u043e\u0434\u043e\u0432.<\/p>\n<pre class=\"lang:c# decode:true\">int x = 3;\nConsole.Write (x.GetType().Name); \/\/ Int32\nConsole.Write (typeof(int).Name); \/\/ Int32\nConsole.Write (x.GetType().FullName); \/\/ System.Int32\nConsole.Write (x.GetType() == typeof(int)); \/\/ True<\/pre>\n<h2>\u0421\u043f\u0438\u0441\u043e\u043a \u0447\u043b\u0435\u043d\u043e\u0432 \u0442\u0438\u043f\u0430\u00a0object<\/h2>\n<ul>\n<li><code>public extern Type <strong>GetType<\/strong>();<\/code><\/li>\n<li><code>public virtual bool <strong>Equals<\/strong> (object obj);<\/code><\/li>\n<li><code>public static bool <strong>Equals<\/strong> (object objA, object objB);<\/code><\/li>\n<li><code>public static bool <strong>ReferenceEquals<\/strong> (object objA,\u00a0object objB);<\/code><\/li>\n<li><code>public virtual int <strong>GetHashCode<\/strong>();<\/code><\/li>\n<li><code>public virtual string <strong>ToString<\/strong>();<\/code><\/li>\n<li><code>protected override void <strong>Finalize<\/strong>();<\/code><\/li>\n<li><code>protected extern object <strong>MemberwiseClone<\/strong>();<\/code><\/li>\n<\/ul>\n<h2>Equals, ReferenceEquals \u0438 GetHashCode<\/h2>\n<p><strong>\u041c\u0435\u0442\u043e\u0434 \u043a\u043b\u0430\u0441\u0441\u0430 <\/strong><code><strong>object\u00a0Equals<\/strong>\u00a0<\/code>\u0441\u0445\u043e\u0436 \u0441 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c <code>==<\/code>, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u00a0<code>Equals<\/code> \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 (virtual), \u0430 <code>==<\/code> \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 (static).<\/p>\n<pre class=\"lang:c# decode:true\">object x = 3;\nobject y = 3;\nConsole.WriteLine (x == y); \/\/ False\nConsole.WriteLine (x.Equals (y)); \/\/ True<\/pre>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 <code>x<\/code> \u0438 <code>y<\/code> \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043a \u0442\u0438\u043f\u0443 <code>object<\/code>, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u044b\u0439\u00a0\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <code>==<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 (\u0438 \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 <code>x<\/code> \u0438\u00a0<code>y<\/code> \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043a \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u043c\u0443 \u0442\u0438\u043f\u0443, \u043e\u043d\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u0432\u0443\u043c\u044f \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u043c\u0438\u0441\u044f \u0432 \u043f\u0430\u043c\u044f\u0442\u0438, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0440\u0430\u0432\u043d\u044b).<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 <code>Equals<\/code> \u043e\u0442\u0441\u044b\u043b\u0430\u0435\u0442 \u043a \u043c\u0435\u0442\u043e\u0434\u0443 <code>Equals<\/code> \u0442\u0438\u043f\u0430 <code>Int32<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e.<\/p>\n<p><strong>\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u0435\u0442\u043e\u0434\u00a0<code>object.Equals<\/code><\/strong> \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434\u00a0<code>Equals<\/code> \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0432 \u0447\u0442\u043e \u043e\u0431\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u043d\u0435 \u0440\u0430\u0432\u043d\u044b <code>null<\/code>.<\/p>\n<pre class=\"lang:c# decode:true\">object x = null, y = 3;\nbool error = x.Equals (y); \/\/\u00a0\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438\nbool ok = object.Equals (x, y); \/\/ \u0411\u0435\u0437 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432\u0435\u0440\u043d\u0435\u0442\u00a0false<\/pre>\n<p><strong>\u041c\u0435\u0442\u043e\u0434\u00a0<code>ReferenceEquals<\/code><\/strong> \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 (\u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u0441\u0441\u044b\u043b\u043e\u0447\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0435\u0441\u043b\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <code>==<\/code> \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043d \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0438\u043d\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435).<\/p>\n<p><strong>\u041c\u0435\u0442\u043e\u0434\u00a0<code>GetHashCode<\/code><\/strong> \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0445\u044d\u0448-\u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044f\u0445, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0445\u044d\u0448-\u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 (<code>System.Collections.Generic.Dictionary<\/code> \u0438\u00a0<code>System.Collections.Hashtable<\/code>).<\/p>\n<h2>\u041c\u0435\u0442\u043e\u0434\u00a0ToString<\/h2>\n<p>\u041c\u0435\u0442\u043e\u0434\u00a0ToString \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u0442\u0438\u043f\u0430. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u0440\u0435\u0434\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432.<\/p>\n<pre class=\"lang:c# decode:true\">string s1 = 1.ToString(); \/\/ s1 =\u00a0\"1\"\nstring s2 = true.ToString(); \/\/ s2 =\u00a0\"True\"<\/pre>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0442\u0438\u043f\u043e\u0432 \u043e\u043d \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d:<\/p>\n<pre class=\"lang:c# decode:true  \">public override string ToString() { return \"Foo\"; }<\/pre>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>object (System.Object) &#8212; \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0442\u0438\u043f\u043e\u0432. \u041b\u044e\u0431\u043e\u0439 \u0442\u0438\u043f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 (\u0441\u043a\u0440\u044b\u0442\u043e) \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043a \u0431\u0430\u0437\u043e\u0432\u043e\u043c\u0443 \u043a\u043b\u0430\u0441\u0441\u0443\u00a0(upcast)\u00a0object.<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[29],"tags":[11],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v18.4.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>C#: \u0442\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442 (Object Type) | devKazakov.com<\/title>\n<meta name=\"description\" content=\"object (System.Object) - \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0442\u0438\u043f\u043e\u0432. \u041b\u044e\u0431\u043e\u0439 \u0442\u0438\u043f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 (\u0441\u043a\u0440\u044b\u0442\u043e) \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043a \u0431\u0430\u0437\u043e\u0432\u043e\u043c\u0443 \u043a\u043b\u0430\u0441\u0441\u0443\u00a0(upcast)\u00a0object.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/devkazakov.com\/ru\/blog\/csharp-tip-obekt-object-type\/\" \/>\n<meta property=\"og:locale\" content=\"ru_RU\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"C#: \u0442\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442 (Object Type) | devKazakov.com\" \/>\n<meta property=\"og:description\" content=\"object (System.Object) - \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0442\u0438\u043f\u043e\u0432. \u041b\u044e\u0431\u043e\u0439 \u0442\u0438\u043f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 (\u0441\u043a\u0440\u044b\u0442\u043e) \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043a \u0431\u0430\u0437\u043e\u0432\u043e\u043c\u0443 \u043a\u043b\u0430\u0441\u0441\u0443\u00a0(upcast)\u00a0object.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/devkazakov.com\/ru\/blog\/csharp-tip-obekt-object-type\/\" \/>\n<meta property=\"og:site_name\" content=\"devKazakov.com\" \/>\n<meta property=\"article:published_time\" content=\"2016-10-11T21:40:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-12T23:12:48+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c\" \/>\n\t<meta name=\"twitter:data1\" content=\"Roman Kazakov\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u043c\u0438\u043d\u0443\u0442\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/devkazakov.com\/ru\/#website\",\"url\":\"https:\/\/devkazakov.com\/ru\/\",\"name\":\"devKazakov.com\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/devkazakov.com\/ru\/#\/schema\/person\/b3f48bf8438d7d5354ee81e92dc477c3\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/devkazakov.com\/ru\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"ru-RU\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/devkazakov.com\/ru\/blog\/csharp-tip-obekt-object-type\/#webpage\",\"url\":\"https:\/\/devkazakov.com\/ru\/blog\/csharp-tip-obekt-object-type\/\",\"name\":\"C#: \u0442\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442 (Object Type) | devKazakov.com\",\"isPartOf\":{\"@id\":\"https:\/\/devkazakov.com\/ru\/#website\"},\"datePublished\":\"2016-10-11T21:40:49+00:00\",\"dateModified\":\"2022-06-12T23:12:48+00:00\",\"description\":\"object (System.Object) - \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0442\u0438\u043f\u043e\u0432. \u041b\u044e\u0431\u043e\u0439 \u0442\u0438\u043f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 (\u0441\u043a\u0440\u044b\u0442\u043e) \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043a \u0431\u0430\u0437\u043e\u0432\u043e\u043c\u0443 \u043a\u043b\u0430\u0441\u0441\u0443\u00a0(upcast)\u00a0object.\",\"breadcrumb\":{\"@id\":\"https:\/\/devkazakov.com\/ru\/blog\/csharp-tip-obekt-object-type\/#breadcrumb\"},\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/devkazakov.com\/ru\/blog\/csharp-tip-obekt-object-type\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/devkazakov.com\/ru\/blog\/csharp-tip-obekt-object-type\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/devkazakov.com\/ru\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"C#: \u0442\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442 (Object Type)\"}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/devkazakov.com\/ru\/blog\/csharp-tip-obekt-object-type\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/devkazakov.com\/ru\/blog\/csharp-tip-obekt-object-type\/#webpage\"},\"author\":{\"@id\":\"https:\/\/devkazakov.com\/ru\/#\/schema\/person\/b3f48bf8438d7d5354ee81e92dc477c3\"},\"headline\":\"C#: \u0442\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442 (Object Type)\",\"datePublished\":\"2016-10-11T21:40:49+00:00\",\"dateModified\":\"2022-06-12T23:12:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/devkazakov.com\/ru\/blog\/csharp-tip-obekt-object-type\/#webpage\"},\"wordCount\":33,\"publisher\":{\"@id\":\"https:\/\/devkazakov.com\/ru\/#\/schema\/person\/b3f48bf8438d7d5354ee81e92dc477c3\"},\"keywords\":[\"C#\"],\"articleSection\":[\"C#\"],\"inLanguage\":\"ru-RU\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/devkazakov.com\/ru\/#\/schema\/person\/b3f48bf8438d7d5354ee81e92dc477c3\",\"name\":\"Roman Kazakov\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/devkazakov.com\/ru\/#personlogo\",\"inLanguage\":\"ru-RU\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d99e1eb55cb87629fd1b4c80a24ea831?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d99e1eb55cb87629fd1b4c80a24ea831?s=96&d=mm&r=g\",\"caption\":\"Roman Kazakov\"},\"logo\":{\"@id\":\"https:\/\/devkazakov.com\/ru\/#personlogo\"},\"sameAs\":[\"https:\/\/devkazakov.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"C#: \u0442\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442 (Object Type) | devKazakov.com","description":"object (System.Object) - \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0442\u0438\u043f\u043e\u0432. \u041b\u044e\u0431\u043e\u0439 \u0442\u0438\u043f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 (\u0441\u043a\u0440\u044b\u0442\u043e) \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043a \u0431\u0430\u0437\u043e\u0432\u043e\u043c\u0443 \u043a\u043b\u0430\u0441\u0441\u0443\u00a0(upcast)\u00a0object.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/devkazakov.com\/ru\/blog\/csharp-tip-obekt-object-type\/","og_locale":"ru_RU","og_type":"article","og_title":"C#: \u0442\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442 (Object Type) | devKazakov.com","og_description":"object (System.Object) - \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0442\u0438\u043f\u043e\u0432. \u041b\u044e\u0431\u043e\u0439 \u0442\u0438\u043f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 (\u0441\u043a\u0440\u044b\u0442\u043e) \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043a \u0431\u0430\u0437\u043e\u0432\u043e\u043c\u0443 \u043a\u043b\u0430\u0441\u0441\u0443\u00a0(upcast)\u00a0object.","og_url":"https:\/\/devkazakov.com\/ru\/blog\/csharp-tip-obekt-object-type\/","og_site_name":"devKazakov.com","article_published_time":"2016-10-11T21:40:49+00:00","article_modified_time":"2022-06-12T23:12:48+00:00","twitter_card":"summary_large_image","twitter_misc":{"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c":"Roman Kazakov","\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f":"5 \u043c\u0438\u043d\u0443\u0442"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/devkazakov.com\/ru\/#website","url":"https:\/\/devkazakov.com\/ru\/","name":"devKazakov.com","description":"","publisher":{"@id":"https:\/\/devkazakov.com\/ru\/#\/schema\/person\/b3f48bf8438d7d5354ee81e92dc477c3"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/devkazakov.com\/ru\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"ru-RU"},{"@type":"WebPage","@id":"https:\/\/devkazakov.com\/ru\/blog\/csharp-tip-obekt-object-type\/#webpage","url":"https:\/\/devkazakov.com\/ru\/blog\/csharp-tip-obekt-object-type\/","name":"C#: \u0442\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442 (Object Type) | devKazakov.com","isPartOf":{"@id":"https:\/\/devkazakov.com\/ru\/#website"},"datePublished":"2016-10-11T21:40:49+00:00","dateModified":"2022-06-12T23:12:48+00:00","description":"object (System.Object) - \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0442\u0438\u043f\u043e\u0432. \u041b\u044e\u0431\u043e\u0439 \u0442\u0438\u043f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 (\u0441\u043a\u0440\u044b\u0442\u043e) \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043a \u0431\u0430\u0437\u043e\u0432\u043e\u043c\u0443 \u043a\u043b\u0430\u0441\u0441\u0443\u00a0(upcast)\u00a0object.","breadcrumb":{"@id":"https:\/\/devkazakov.com\/ru\/blog\/csharp-tip-obekt-object-type\/#breadcrumb"},"inLanguage":"ru-RU","potentialAction":[{"@type":"ReadAction","target":["https:\/\/devkazakov.com\/ru\/blog\/csharp-tip-obekt-object-type\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/devkazakov.com\/ru\/blog\/csharp-tip-obekt-object-type\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/devkazakov.com\/ru\/"},{"@type":"ListItem","position":2,"name":"C#: \u0442\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442 (Object Type)"}]},{"@type":"Article","@id":"https:\/\/devkazakov.com\/ru\/blog\/csharp-tip-obekt-object-type\/#article","isPartOf":{"@id":"https:\/\/devkazakov.com\/ru\/blog\/csharp-tip-obekt-object-type\/#webpage"},"author":{"@id":"https:\/\/devkazakov.com\/ru\/#\/schema\/person\/b3f48bf8438d7d5354ee81e92dc477c3"},"headline":"C#: \u0442\u0438\u043f \u043e\u0431\u044a\u0435\u043a\u0442 (Object Type)","datePublished":"2016-10-11T21:40:49+00:00","dateModified":"2022-06-12T23:12:48+00:00","mainEntityOfPage":{"@id":"https:\/\/devkazakov.com\/ru\/blog\/csharp-tip-obekt-object-type\/#webpage"},"wordCount":33,"publisher":{"@id":"https:\/\/devkazakov.com\/ru\/#\/schema\/person\/b3f48bf8438d7d5354ee81e92dc477c3"},"keywords":["C#"],"articleSection":["C#"],"inLanguage":"ru-RU"},{"@type":["Person","Organization"],"@id":"https:\/\/devkazakov.com\/ru\/#\/schema\/person\/b3f48bf8438d7d5354ee81e92dc477c3","name":"Roman Kazakov","image":{"@type":"ImageObject","@id":"https:\/\/devkazakov.com\/ru\/#personlogo","inLanguage":"ru-RU","url":"https:\/\/secure.gravatar.com\/avatar\/d99e1eb55cb87629fd1b4c80a24ea831?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d99e1eb55cb87629fd1b4c80a24ea831?s=96&d=mm&r=g","caption":"Roman Kazakov"},"logo":{"@id":"https:\/\/devkazakov.com\/ru\/#personlogo"},"sameAs":["https:\/\/devkazakov.com"]}]}},"_links":{"self":[{"href":"https:\/\/devkazakov.com\/ru\/wp-json\/wp\/v2\/posts\/1209"}],"collection":[{"href":"https:\/\/devkazakov.com\/ru\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devkazakov.com\/ru\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devkazakov.com\/ru\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/devkazakov.com\/ru\/wp-json\/wp\/v2\/comments?post=1209"}],"version-history":[{"count":1,"href":"https:\/\/devkazakov.com\/ru\/wp-json\/wp\/v2\/posts\/1209\/revisions"}],"predecessor-version":[{"id":2149,"href":"https:\/\/devkazakov.com\/ru\/wp-json\/wp\/v2\/posts\/1209\/revisions\/2149"}],"wp:attachment":[{"href":"https:\/\/devkazakov.com\/ru\/wp-json\/wp\/v2\/media?parent=1209"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devkazakov.com\/ru\/wp-json\/wp\/v2\/categories?post=1209"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devkazakov.com\/ru\/wp-json\/wp\/v2\/tags?post=1209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}