<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Forex Software — switch statement]]></title>
		<link>https://forexsb.com/forum/topic/4584/switch-statement/</link>
		<atom:link href="https://forexsb.com/forum/feed/rss/topic/4584/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in switch statement.]]></description>
		<lastBuildDate>Wed, 08 Jan 2014 15:03:52 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: switch statement]]></title>
			<link>https://forexsb.com/forum/post/23297/#p23297</link>
			<description><![CDATA[<p>int caseSwitch = 2;<br />switch (caseSwitch)<br />{<br />&nbsp; &nbsp; case 1:<br />&nbsp; &nbsp; &nbsp; &nbsp; Console.WriteLine(&quot;Case 1&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; break;<br />&nbsp; &nbsp; case 2:<br />&nbsp; &nbsp; &nbsp; &nbsp; Console.WriteLine(&quot;Case 2&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; break;<br />&nbsp; &nbsp; default:<br />&nbsp; &nbsp; &nbsp; &nbsp; Console.WriteLine(&quot;Default case&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; break;<br />}</p><p>the switch is like multiple &quot;if&quot; statements. if the case value matches the switch condition the code for that case is executed, if there is a break inside that &quot;case&quot;, the switch statement is exited and the remaining case checks are not performed. the default will execute if the code reaches that point in the &quot;switch&quot; without hitting a break before that.</p><p>the return; after the } exits the current function or procedure.</p><p>in the current example if there was no &quot;break;&quot; in case 2 the output would be:</p><p>Case 2<br />Default Case</p><p>with the break it would be:</p><p>Case 2</p>]]></description>
			<author><![CDATA[null@example.com (ultplyr)]]></author>
			<pubDate>Wed, 08 Jan 2014 15:03:52 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/23297/#p23297</guid>
		</item>
		<item>
			<title><![CDATA[switch statement]]></title>
			<link>https://forexsb.com/forum/post/23183/#p23183</link>
			<description><![CDATA[<p>Kindly could any one tell me the difference between <br /></p><div class="codebox"><pre><code>break;
                default:
                    break;
            }
 
            return;</code></pre></div><p>&nbsp; </p><p>AND </p><div class="codebox"><pre><code>break;</code></pre></div><p>&nbsp; &nbsp;<br />I noticed some indicators &#039;&#039; Calculation Part&#039;&#039; ends with the first and some end with the second , despite the action is the same which is enter or exit at a specific level</p>]]></description>
			<author><![CDATA[null@example.com (ahmedalhoseny)]]></author>
			<pubDate>Thu, 26 Dec 2013 18:21:36 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/23183/#p23183</guid>
		</item>
	</channel>
</rss>
