{"id":6153,"date":"2022-04-28T09:45:07","date_gmt":"2022-04-28T08:45:07","guid":{"rendered":"https:\/\/solidt.eu\/site\/?p=6153"},"modified":"2023-01-13T10:00:52","modified_gmt":"2023-01-13T09:00:52","slug":"c-check-if-variables-refer-to-the-same-instance","status":"publish","type":"post","link":"https:\/\/solidt.eu\/site\/c-check-if-variables-refer-to-the-same-instance\/","title":{"rendered":"C# Check if variables refer to the same instance \/ memory address"},"content":{"rendered":"\n<p><a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/api\/system.object.referenceequals?view=net-6.0\">https:\/\/docs.microsoft.com\/en-us\/dotnet\/api\/system.object.referenceequals?view=net-6.0<\/a><\/p>\n\n\n\n<div style=\"height: 250px; position:relative; margin-bottom: 50px;\" class=\"wp-block-simple-code-block-ace\"><pre class=\"wp-block-simple-code-block-ace\" style=\"position:absolute;top:0;right:0;bottom:0;left:0\" data-mode=\"csharp\" data-theme=\"monokai\" data-fontsize=\"14\" data-lines=\"Infinity\" data-showlines=\"true\" data-copy=\"false\">using System;\n\nvar o1 = new Object();\nvar o2 = new Object();\n\nObject.ReferenceEquals(o1, o2)<\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/docs.microsoft.com\/en-us\/dotnet\/api\/system.object.referenceequals?view=net-6.0<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[6,4,1],"tags":[],"class_list":["post-6153","post","type-post","status-publish","format-standard","hentry","category-dotnet","category-programming","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/6153","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/comments?post=6153"}],"version-history":[{"count":2,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/6153\/revisions"}],"predecessor-version":[{"id":7198,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/6153\/revisions\/7198"}],"wp:attachment":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/media?parent=6153"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/categories?post=6153"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/tags?post=6153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}