{"id":574,"date":"2022-05-26T08:34:59","date_gmt":"2022-05-26T07:34:59","guid":{"rendered":"https:\/\/ibex.tech\/csharp\/?p=574"},"modified":"2026-06-17T09:26:06","modified_gmt":"2026-06-17T08:26:06","slug":"if","status":"publish","type":"post","link":"https:\/\/ibex.tech\/csharp\/c-sharp\/if\/if","title":{"rendered":"if"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">If with load of a&nbsp;return value into a variable<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Ensure you enclose the assignment in brackets or it won\u2019t work correctly<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\tif ((MyVariable = SomeFunction()) > -1)\n\t{\n\t\t\/\/MyVariable contains the return value\n\t}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If with load of a&nbsp;return value into a variable Ensure you enclose the assignment in brackets or it won\u2019t work correctly<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[57],"tags":[],"class_list":["post-574","post","type-post","status-publish","format-standard","hentry","category-if"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/574","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/comments?post=574"}],"version-history":[{"count":1,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/574\/revisions"}],"predecessor-version":[{"id":575,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/574\/revisions\/575"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/media?parent=574"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/categories?post=574"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/tags?post=574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}