{"id":63,"date":"2025-07-06T04:02:28","date_gmt":"2025-07-06T04:02:28","guid":{"rendered":"https:\/\/techobjects.net\/?p=63"},"modified":"2025-07-06T04:02:28","modified_gmt":"2025-07-06T04:02:28","slug":"pass-by-reference-vs-pass-by-value","status":"publish","type":"post","link":"https:\/\/techobjects.net\/?p=63","title":{"rendered":"Pass by Reference vs Pass by Value"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In C# passing by reference means you are essentially passing where an object is in memory. This means if you modify the object in a separate method then it updates the original object.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">An example of this is a Dictionary. Passing by reference utilizes the keyword ref or out.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Passing by value which is the default in c# means we are passing a copy and does not modify the original value.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In C# passing by reference means you are essentially passing where an object is in memory. This means if you modify the object in a separate method then it updates the original object. An example of this is a Dictionary. Passing by reference utilizes the keyword ref or out. Passing by value which is the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-63","post","type-post","status-publish","format-standard","hentry","category-c"],"brizy_media":[],"_links":{"self":[{"href":"https:\/\/techobjects.net\/index.php?rest_route=\/wp\/v2\/posts\/63","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techobjects.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techobjects.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techobjects.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techobjects.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=63"}],"version-history":[{"count":0,"href":"https:\/\/techobjects.net\/index.php?rest_route=\/wp\/v2\/posts\/63\/revisions"}],"wp:attachment":[{"href":"https:\/\/techobjects.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=63"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techobjects.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=63"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techobjects.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=63"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}