<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forex Software — switch statement]]></title>
	<link rel="self" href="https://forexsb.com/forum/feed/atom/topic/4584/" />
	<updated>2014-01-08T15:03:52Z</updated>
	<generator>PunBB</generator>
	<id>https://forexsb.com/forum/topic/4584/switch-statement/</id>
		<entry>
			<title type="html"><![CDATA[Re: switch statement]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/23297/#p23297" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[ultplyr]]></name>
				<uri>https://forexsb.com/forum/user/6604/</uri>
			</author>
			<updated>2014-01-08T15:03:52Z</updated>
			<id>https://forexsb.com/forum/post/23297/#p23297</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[switch statement]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/23183/#p23183" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[ahmedalhoseny]]></name>
				<uri>https://forexsb.com/forum/user/1512/</uri>
			</author>
			<updated>2013-12-26T18:21:36Z</updated>
			<id>https://forexsb.com/forum/post/23183/#p23183</id>
		</entry>
</feed>
