A
A
artshelom2018-11-17 23:27:17
C++ / C#
artshelom, 2018-11-17 23:27:17

How can I pass parameters to a form and return them from the main form?

I'm trying to pass parameters to the form, but it says: "Availability inconsistency".
Here is the code:

class TableTutorialItems : DockContent
  {
    public TableTutorialItems()
    {
      Text = "Таблица описания ходов";
      InitializeComponent();
    }
    public void WriteTable(List<model.Model> lis2t)
    {
      Console.WriteLine(lis2t);
    }

How can I pass parameters to a form and return them from the main form?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
#
#, 2018-11-18
@artshelom

for each form, create a public method or property, to receive data and you will be happy
, do not forget that the main form sees the child ones by the fact that it generates them, but the child must be told where and how to return the processing results. everything is the same - through public methods or properties, although it is also possible through the constructor

O
Oleg Pogrebnyak, 2018-11-18
@S0HardCore

Is the model object class public?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question