How to call a class from a winform? : <p>Sorry I use this title on purpose. I m quite new on c# and i don't manage to call my class on the usual way.</p>

<p>I have a winform and I want to insert a class (copy and paste from an API), and call it from my winform. </p>

<p>This class is a program which open the console, ask me parameters and then lunch an EMG acquisition.</p>

<p>the class is like that:</p>

<pre><code>  class Program1     
        {
            static void Main(string[] args)
            { 
// some code here, with  a lot of "Console.Writeline"
            }
        }
</code></pre>

<p>It works fine.</p>

<p>I change it to:</p>

<pre><code>  public class Program1     
            {
               public void method1(string[] args)
                { 
//some code here, , with  a lot of "Console.Writeline"
                }
            }
</code></pre>

<p>And i tried to call it on my form </p>

<pre><code> private void button1_Click(object sender, EventArgs e)
        {
            Program1 program = new Program1();
            program.method1();
        }
</code></pre>

<p>it says "No overload for method 'method1' takes 0 arguments" . 
The thing i don"t understand is when i run the program of the API alone it doesn't ask me anything it just runs. </p>

<p>I'm pretty sure the error is from the <code>Console.WriteLine</code> and <code>Console.Readline</code> but i don't know how to resolve my problem. 
I want a button on my winform which run my class, open the console and ask me on the console which paramaters i want.</p>

<p>Thank you !</p>
