<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.aras.com/community/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Can string interpolation syntax be used in server method?</title><link>https://www.aras.com/community/f/development/6321/can-string-interpolation-syntax-be-used-in-server-method</link><description>Is it somehow possible to use C# string interpolation in server method? 
 For example: 
 ... 
 var text = &amp;quot;the text&amp;quot;; var result = $&amp;quot;This is {text}&amp;quot;; 
 ... 
 The Innovator&amp;#39;s default syntax checker gives an error for this code: Error Number: CS1056, Unexpected</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: Can string interpolation syntax be used in server method?</title><link>https://www.aras.com/community/thread/3617?ContentTypeID=1</link><pubDate>Fri, 27 Sep 2019 11:34:04 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:e05773e5-2609-4c11-9954-28fc4b97aa57</guid><dc:creator>cogres</dc:creator><description>&lt;p&gt;For C#, it depends on the C# version/.NET Framework that is being used for your Aras Installation/service pack. C#6 was introduced in .NET Framework 4.6, I believe. For example, in Innovator 12 (which requires .NET Framework 4.7.2, if I recall correctly), String interpolation works as you described in your code example. In older versions of Aras using older Frameworks, you will need to use string.Format() or StringBuilder as Angela suggested.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can string interpolation syntax be used in server method?</title><link>https://www.aras.com/community/thread/3605?ContentTypeID=1</link><pubDate>Thu, 26 Sep 2019 10:34:46 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:526606d7-e87e-46c4-8438-519d1968fd5b</guid><dc:creator>AngelaIp</dc:creator><description>&lt;p&gt;Do you want to use Javascript or C#?&lt;/p&gt;
&lt;p&gt;For JS e.g. this may work:&lt;/p&gt;
&lt;p&gt;var age = 103;&lt;br /&gt;alert(`I&amp;#39;m ${age} years old!`);&lt;/p&gt;
&lt;p&gt;For C# you can use StringBuilder or String.Format.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>