<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Sharing Code Between Forms</title><link>https://www.infopathdev.com:443/forums/thread/14849.aspx</link><pubDate>Fri, 27 Oct 2006 06:36:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:14849</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/14849.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=14849</wfw:commentRss><description>Hi Dean,&lt;br /&gt;&lt;br /&gt;You can write all common methods in one class file and save this file as FileName.cs extension.&lt;br /&gt;&lt;br /&gt;For example: Your saved file namespace is “CommonFile” and class name is “Utilities”.&lt;br /&gt;&lt;br /&gt;Follow these below steps to your second solution file for adding above class file.&lt;br /&gt;&lt;br /&gt;1.	Right click on Solution file and select “Add” - &amp;gt; “Add Existing Item” and select above class file (FileName.cs). &lt;br /&gt;2.	Add a reference file to your code at the top by &lt;br /&gt;	&lt;b&gt;Using &amp;lt;CommonFile&amp;gt;;&lt;/b&gt;&lt;br /&gt;3.	Inheritance your common file class using below code:&lt;br /&gt;&lt;b&gt;public class SecondClassName : Utilities&lt;/b&gt;&lt;br /&gt;4.	Add one line code in to the startup function as below&lt;br /&gt;&lt;b&gt;base.Init(thisXDocument, thisApplication, CultureInfo.CurrentCulture);&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Note: The above code in C#&lt;br /&gt;</description></item><item><title>Sharing Code Between Forms</title><link>https://www.infopathdev.com:443/forums/thread/12967.aspx</link><pubDate>Thu, 26 Oct 2006 18:13:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12967</guid><dc:creator>dlgross</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12967.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12967</wfw:commentRss><description>How can I access the same code from multiple forms? I don't want to copy and paste the same functions into the forms since this could become a maintenance headache.&lt;br /&gt;TIA&lt;br /&gt;Dean</description></item></channel></rss>