<?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 Using LINQ in Code Stage in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Using-LINQ-in-Code-Stage/m-p/53740#M8370</link>
    <description>Hi All,

&amp;nbsp;

I am trying to use the LINQ code in code stage of Blue Prism. Code is having no error but when I am trying to run it is giving following error:

Description: Compiler error at top section line 7: A using namespace directive can only be applied to namespaces; 'System.Data.DataTable' is a type not a namespace
Could you anyone can help me to solve it out.

DLL is use are as follows:

System.Core.dll ;&amp;nbsp;System.dll ;&amp;nbsp;System.Data.dll ;&amp;nbsp;System.Xml.dll ;&amp;nbsp;System.Drawing.dll ;&amp;nbsp;System.Data.DataSetExtensions.dll

Namespaces are as follows:

System ;&amp;nbsp;System.Drawing ;System.Data ;&amp;nbsp;System.Linq ;&amp;nbsp;System.Collections.Generic ;&amp;nbsp;System.Data.DataTable

Code Stage :&amp;nbsp;

Coll2 = new DataTable();
Coll1 = new DataTable();
Coll2 = Coll1.Clone();
var Result = from num in Coll1.AsEnumerable() Select num.ToList(); // to select all the data from Coll1 input collection
foreach(var res in Result)
{
&amp;nbsp;&amp;nbsp; &amp;nbsp;Coll2.ImportRow(res);
} &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;

Regards

Jatin Kalra</description>
    <pubDate>Sat, 23 Feb 2019 19:45:00 GMT</pubDate>
    <dc:creator>Jatin__Kalra</dc:creator>
    <dc:date>2019-02-23T19:45:00Z</dc:date>
    <item>
      <title>Using LINQ in Code Stage</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Using-LINQ-in-Code-Stage/m-p/53740#M8370</link>
      <description>Hi All,

&amp;nbsp;

I am trying to use the LINQ code in code stage of Blue Prism. Code is having no error but when I am trying to run it is giving following error:

Description: Compiler error at top section line 7: A using namespace directive can only be applied to namespaces; 'System.Data.DataTable' is a type not a namespace
Could you anyone can help me to solve it out.

DLL is use are as follows:

System.Core.dll ;&amp;nbsp;System.dll ;&amp;nbsp;System.Data.dll ;&amp;nbsp;System.Xml.dll ;&amp;nbsp;System.Drawing.dll ;&amp;nbsp;System.Data.DataSetExtensions.dll

Namespaces are as follows:

System ;&amp;nbsp;System.Drawing ;System.Data ;&amp;nbsp;System.Linq ;&amp;nbsp;System.Collections.Generic ;&amp;nbsp;System.Data.DataTable

Code Stage :&amp;nbsp;

Coll2 = new DataTable();
Coll1 = new DataTable();
Coll2 = Coll1.Clone();
var Result = from num in Coll1.AsEnumerable() Select num.ToList(); // to select all the data from Coll1 input collection
foreach(var res in Result)
{
&amp;nbsp;&amp;nbsp; &amp;nbsp;Coll2.ImportRow(res);
} &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;

Regards

Jatin Kalra</description>
      <pubDate>Sat, 23 Feb 2019 19:45:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Using-LINQ-in-Code-Stage/m-p/53740#M8370</guid>
      <dc:creator>Jatin__Kalra</dc:creator>
      <dc:date>2019-02-23T19:45:00Z</dc:date>
    </item>
    <item>
      <title>Try removing System.Data…</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Using-LINQ-in-Code-Stage/m-p/53741#M8371</link>
      <description>Try removing System.Data.DataTable as a namespace.</description>
      <pubDate>Mon, 25 Feb 2019 20:42:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Using-LINQ-in-Code-Stage/m-p/53741#M8371</guid>
      <dc:creator>AmiBarrett</dc:creator>
      <dc:date>2019-02-25T20:42:00Z</dc:date>
    </item>
  </channel>
</rss>

