<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic RE: C# code can run without brackets ? {} in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/C-code-can-run-without-brackets/m-p/91544#M41530</link>
    <description>On a high-level principle, what you're saying is correct. However, since there is no console to write to, WriteLine would not work. What you could do in Blue Prism, is save the result of&amp;nbsp;&lt;SPAN&gt;Sqrt(&lt;/SPAN&gt;&lt;SPAN class="hljs-number"&gt;3&lt;/SPAN&gt;&lt;SPAN&gt;*&lt;/SPAN&gt;&lt;SPAN class="hljs-number"&gt;3&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;+&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="hljs-number"&gt;4&lt;/SPAN&gt;&lt;SPAN&gt;*&lt;/SPAN&gt;&lt;SPAN class="hljs-number"&gt;4&lt;/SPAN&gt;&lt;SPAN&gt;) to a variable, and make sure that variable is in the code stage outputs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Ami Barrett&lt;BR /&gt;Lead RPA Software Developer&lt;BR /&gt;Solai &amp;amp; Cameron&lt;BR /&gt;Richardson, TX&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Mon, 23 Sep 2019 14:41:00 GMT</pubDate>
    <dc:creator>AmiBarrett</dc:creator>
    <dc:date>2019-09-23T14:41:00Z</dc:date>
    <item>
      <title>C# code can run without brackets ? {}</title>
      <link>https://community.blueprism.com/t5/Product-Forum/C-code-can-run-without-brackets/m-p/91543#M41529</link>
      <description>Hi guys,&lt;BR /&gt;&lt;BR /&gt;Just wanted to see if there is some kind of document regarding code stages. Want to see if a C# code can run without brackets {}.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Seen some code without brackets and would like to know which is the approach of inserting code stage/code stage guidelines.&lt;BR /&gt;Does the code compile within BP without any brackets like this? {}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;E.g&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;{ &lt;/SPAN&gt;&lt;SPAN class="hljs-function"&gt;&lt;SPAN class="hljs-keyword"&gt;static&lt;/SPAN&gt; &lt;SPAN class="hljs-keyword"&gt;void&lt;/SPAN&gt; &lt;SPAN class="hljs-title"&gt;Main&lt;/SPAN&gt;(&lt;SPAN class="hljs-params"&gt;&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN&gt; { &lt;BR /&gt;WriteLine(Sqrt(&lt;/SPAN&gt;&lt;SPAN class="hljs-number"&gt;3&lt;/SPAN&gt;&lt;SPAN&gt;*&lt;/SPAN&gt;&lt;SPAN class="hljs-number"&gt;3&lt;/SPAN&gt;&lt;SPAN&gt; + &lt;/SPAN&gt;&lt;SPAN class="hljs-number"&gt;4&lt;/SPAN&gt;&lt;SPAN&gt;*&lt;/SPAN&gt;&lt;SPAN class="hljs-number"&gt;4&lt;/SPAN&gt;&lt;SPAN&gt;)); } &lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;can use simply&amp;nbsp;&lt;SPAN&gt;WriteLine(Sqrt(&lt;/SPAN&gt;&lt;SPAN class="hljs-number"&gt;3&lt;/SPAN&gt;&lt;SPAN&gt;*&lt;/SPAN&gt;&lt;SPAN class="hljs-number"&gt;3&lt;/SPAN&gt;&lt;SPAN&gt; + &lt;/SPAN&gt;&lt;SPAN class="hljs-number"&gt;4&lt;/SPAN&gt;&lt;SPAN&gt;*&lt;/SPAN&gt;&lt;SPAN class="hljs-number"&gt;4&lt;/SPAN&gt;&lt;SPAN&gt;)); &lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Ionut&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Cohen&lt;BR /&gt;RPA Developer&lt;BR /&gt;&lt;BR /&gt;Romania&lt;BR /&gt;------------------------------</description>
      <pubDate>Mon, 23 Sep 2019 12:21:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/C-code-can-run-without-brackets/m-p/91543#M41529</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-23T12:21:00Z</dc:date>
    </item>
    <item>
      <title>RE: C# code can run without brackets ? {}</title>
      <link>https://community.blueprism.com/t5/Product-Forum/C-code-can-run-without-brackets/m-p/91544#M41530</link>
      <description>On a high-level principle, what you're saying is correct. However, since there is no console to write to, WriteLine would not work. What you could do in Blue Prism, is save the result of&amp;nbsp;&lt;SPAN&gt;Sqrt(&lt;/SPAN&gt;&lt;SPAN class="hljs-number"&gt;3&lt;/SPAN&gt;&lt;SPAN&gt;*&lt;/SPAN&gt;&lt;SPAN class="hljs-number"&gt;3&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;+&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="hljs-number"&gt;4&lt;/SPAN&gt;&lt;SPAN&gt;*&lt;/SPAN&gt;&lt;SPAN class="hljs-number"&gt;4&lt;/SPAN&gt;&lt;SPAN&gt;) to a variable, and make sure that variable is in the code stage outputs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Ami Barrett&lt;BR /&gt;Lead RPA Software Developer&lt;BR /&gt;Solai &amp;amp; Cameron&lt;BR /&gt;Richardson, TX&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Mon, 23 Sep 2019 14:41:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/C-code-can-run-without-brackets/m-p/91544#M41530</guid>
      <dc:creator>AmiBarrett</dc:creator>
      <dc:date>2019-09-23T14:41:00Z</dc:date>
    </item>
    <item>
      <title>RE: C# code can run without brackets ? {}</title>
      <link>https://community.blueprism.com/t5/Product-Forum/C-code-can-run-without-brackets/m-p/91545#M41531</link>
      <description>Morning and thank you for your answer!&lt;BR /&gt;&lt;BR /&gt;Now I realized that that into the Initialise Page at Global Code tab there is a plethora of code and in the code stage, people were using/calling the methods from this Global Code tab to the Code Stage. Nevertheless the code inside that code stage has no curly brackets {}.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Cohen&lt;BR /&gt;RPA Developer&lt;BR /&gt;&lt;BR /&gt;Romania&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Sep 2019 05:13:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/C-code-can-run-without-brackets/m-p/91545#M41531</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-24T05:13:00Z</dc:date>
    </item>
    <item>
      <title>RE: C# code can run without brackets ? {}</title>
      <link>https://community.blueprism.com/t5/Product-Forum/C-code-can-run-without-brackets/m-p/91546#M41532</link>
      <description>I think you are confusing Visual Basic with C#.&amp;nbsp; Many of the VBOs provided with Blue Prism make use of Visual Basic which does not use curly brackets.&amp;nbsp; You should end up with code errors should you try not to use brackets for C# code.&amp;nbsp; There is a drop-down on the Code Options page that lets you switch between VB, C# and Visual J#.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Robert Borter&lt;BR /&gt;Systems Architect&lt;BR /&gt;Virginia Dept of Transportation&lt;BR /&gt;America/New_York&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Sep 2019 12:58:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/C-code-can-run-without-brackets/m-p/91546#M41532</guid>
      <dc:creator>RobertBorter</dc:creator>
      <dc:date>2019-09-25T12:58:00Z</dc:date>
    </item>
    <item>
      <title>RE: C# code can run without brackets ? {}</title>
      <link>https://community.blueprism.com/t5/Product-Forum/C-code-can-run-without-brackets/m-p/91547#M41533</link>
      <description>It's useful, but maybe inaccurate, to think of a code stage as a method.&lt;BR /&gt;&lt;BR /&gt;For instance this stage:&lt;BR /&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="29537.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/29666i2D638FC2EF99F9A3/image-size/large?v=v2&amp;amp;px=999" role="button" title="29537.png" alt="29537.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;BR /&gt;Contains only these lines:&lt;BR /&gt;DateTime dtNow = DateTime.Now;&lt;BR /&gt;DateTime conversion = DateTime.SpecifyKind(dtNow, DateTimeKind.Utc);&lt;BR /&gt;CurrentDateTime = conversion.ToLocalTime();&lt;BR /&gt;&lt;BR /&gt;No brackets.&amp;nbsp; The code stage has inputs and outputs, and these are basically input parameters and return type.&lt;BR /&gt;&lt;BR /&gt;So the code stage pseudocode would be the method:&lt;BR /&gt;&lt;BR /&gt;private DateTime CurrentDateTime ()&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; &amp;lt;code above with DateTime return value&amp;gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Brian Clayton&lt;BR /&gt;Lead Developer - C#/Blue Prism RPA&lt;BR /&gt;The Auto Club Group&lt;BR /&gt;America/Detroit&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Oct 2019 16:03:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/C-code-can-run-without-brackets/m-p/91547#M41533</guid>
      <dc:creator>bclayton1896</dc:creator>
      <dc:date>2019-10-03T16:03:00Z</dc:date>
    </item>
  </channel>
</rss>

