trouble passing reference to instance

  • Thread starter Thread starter jkv
  • Start date Start date
J

jkv

Hi,

I have recently migrated from Python to C# and im having some trouble
passing reference to a instance.
What i want to

MainForm.cs:

namespace ms_csharp
{

public partial class MainWindow : Form
{

public MainWindow()
{
InitializeComponent();
DataReader techsum = new DataReader(this);
}
}

AnotherForm:

namespace ms_csharp
{

public class DataReader
{

public DataReader(MainWindow bah)
{
_MainWindow = bah;
}
}
 
Back
Top