When you create a "blank" class, it is given a default constructor by the compiler - one which takes no parameters. It's as if you wrote the class as:
public class MyClass
{
public MyClass() {}
}
But a default constructor isn't the only one you can have - you can have constructors with parameters as well:
public class MyClass
{
private int[] myData;
public MyClass(int count)
{
myData = new int[count];
}
}
In this case, the constructor allocates the required number of integers in the internal array.
And you then create your class instance like this:
int i = int.Parse(myTextBox.Text);
MyClass mc = new MyClass(i);