I am trying to structure my code in a better way than a pile of classes. I was going to use a DLL, but I am now stuck.
The code below represents parts of the Windows Forms application and part of a DLL.
I need to make methods of the AxerDataMgrClass available to the code in frmEnabledApps class and MainForm class.
How does one do that?
Code:using System; using System.Windows.Forms; using nsCommonDLL; namespace AccessTestForm1 { public partial class Form1 : Form { CommonDLLClass DEF = new CommonDLLClass(); public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { } } }Code:using System; using System.Collections.Generic; using System.Windows.Forms; using CD = nsCommonDLL.CommonDLLClass; namespace AccessTestForm1 { public partial class CommonDLLTestForm2 : Form { public CommonDLLTestForm2() { InitializeComponent(); } private void CommonDLLTestForm2_Load(object sender, EventArgs e) { I need to access TMC.UpdateAppsLists() here. } } }Code:using System; namespace nsCommonDLL { public class CommonDLLClass { public string ABC = "aBC"; public string XYZ() { return "xyz"; } private string QQQ = "QQQ"; } }




Reply With Quote