cancel
Showing results for 
Search instead for 
Did you mean: 

Using LINQ in Code Stage

Jatin__Kalra
Level 5
Hi All,   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 ; System.dll ; System.Data.dll ; System.Xml.dll ; System.Drawing.dll ; System.Data.DataSetExtensions.dll Namespaces are as follows: System ; System.Drawing ;System.Data ; System.Linq ; System.Collections.Generic ; System.Data.DataTable Code Stage :  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) {     Coll2.ImportRow(res); }         Regards Jatin Kalra
Jatin Kalra Manager Genpact Noida UP [Phone]
1 REPLY 1

AmiBarrett
Level 12
Try removing System.Data.DataTable as a namespace.