trouble passing reference to instance

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;
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top