I have tried to delare the List Incr outside the if-statment and then inside the if-statement I declare a new instance of the List but when doing this I get a compilerror that says:
left of '.Add' must have class/struct/union
List<int>^ Incr;
if( textBox1->Text != "" )
{
Incr = gcnew List<int>;
//Add element
Incr.Add(1);
}