<?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 c# in Code block in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Using-c-in-Code-block/m-p/49486#M4886</link>
    <description>I tried using c# in code block. It was working fine when i tried assigning simple string variables.
But when i try to create a Collection or a datatable and assign it to a variable I'm getting few errors such as
System.ComponentModel.MarshalByValueComponent is in a assembly that is not referenced.
System.ComponentModel.IListSource is in a assembly that is not referenced.
System.ComponentModel.ISupportIniatializeNotification is in a assembly that is not referenced.

Code Block
DataTable table = new DataTable();
	table.Columns.Add("Dosage", typeof(int));
	table.Columns.Add("Drug", typeof(string));
	table.Columns.Add("Patient", typeof(string));
	table.Columns.Add("Date", typeof(DateTime));

	
	table.Rows.Add(25, "Indocin", "David", DateTime.Now);
	table.Rows.Add(50, "Enebrel", "Sam", DateTime.Now);
	table.Rows.Add(10, "Hydralazine", "Christoff", DateTime.Now);
	table.Rows.Add(21, "Combivent", "Janet", DateTime.Now);
	table.Rows.Add(100, "Dilantin", "Melanie", DateTime.Now);
	
	Output = table;</description>
    <pubDate>Thu, 01 Dec 2016 21:48:00 GMT</pubDate>
    <dc:creator>vignesh_sundar</dc:creator>
    <dc:date>2016-12-01T21:48:00Z</dc:date>
    <item>
      <title>Using c# in Code block</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Using-c-in-Code-block/m-p/49486#M4886</link>
      <description>I tried using c# in code block. It was working fine when i tried assigning simple string variables.
But when i try to create a Collection or a datatable and assign it to a variable I'm getting few errors such as
System.ComponentModel.MarshalByValueComponent is in a assembly that is not referenced.
System.ComponentModel.IListSource is in a assembly that is not referenced.
System.ComponentModel.ISupportIniatializeNotification is in a assembly that is not referenced.

Code Block
DataTable table = new DataTable();
	table.Columns.Add("Dosage", typeof(int));
	table.Columns.Add("Drug", typeof(string));
	table.Columns.Add("Patient", typeof(string));
	table.Columns.Add("Date", typeof(DateTime));

	
	table.Rows.Add(25, "Indocin", "David", DateTime.Now);
	table.Rows.Add(50, "Enebrel", "Sam", DateTime.Now);
	table.Rows.Add(10, "Hydralazine", "Christoff", DateTime.Now);
	table.Rows.Add(21, "Combivent", "Janet", DateTime.Now);
	table.Rows.Add(100, "Dilantin", "Melanie", DateTime.Now);
	
	Output = table;</description>
      <pubDate>Thu, 01 Dec 2016 21:48:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Using-c-in-Code-block/m-p/49486#M4886</guid>
      <dc:creator>vignesh_sundar</dc:creator>
      <dc:date>2016-12-01T21:48:00Z</dc:date>
    </item>
    <item>
      <title>You need to Add External</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Using-c-in-Code-block/m-p/49487#M4887</link>
      <description>You need to Add External Reference to the appropiate .NET dll, in your case is System.dll</description>
      <pubDate>Fri, 02 Dec 2016 01:07:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Using-c-in-Code-block/m-p/49487#M4887</guid>
      <dc:creator>AlainBismark</dc:creator>
      <dc:date>2016-12-02T01:07:00Z</dc:date>
    </item>
    <item>
      <title>In this case if i add an</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Using-c-in-Code-block/m-p/49488#M4888</link>
      <description>In this case if i add an external reference to mscorlib.dll, I'm getting a new error
""An assembly with the same identity exists. Try removing the duplicate reference"".</description>
      <pubDate>Fri, 02 Dec 2016 11:14:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Using-c-in-Code-block/m-p/49488#M4888</guid>
      <dc:creator>vignesh_sundar</dc:creator>
      <dc:date>2016-12-02T11:14:00Z</dc:date>
    </item>
  </channel>
</rss>

