So I've been trying to figure out how to get my code to work all night. I've been reading up on all kinds of stuff and trying to identify what I'm doing wrong, but everything I try I end up at the same issue. I'm trying to change a variable in my class by referencing it in a method so it will change in the class and not just locally. But I don't know what to put as a parameter for the ref Storyboard SB. Can someone tell me what should be done, I've tried setting it to null, even through a variable and it doesn't work. Also 'StoryBoard' is the class that I'm writing the code in.
public class StoryBoard
{
public string[] TextBoxes = new string[10];
public int Counter = 0;
private void RtClickButton_Click(object sender, EventArgs e)
{
RtClickButton_ClickImpl(sender, e, "what would I put here?");
}
private void RtClickButton_ClickImpl(object sender, EventArgs e, ref StoryBoard SB)
{
string TBT = TxtBox.Text;
switch(Counter)
{
case 0:
TextBoxes[Counter] = TBT;
break;
}
SB.Counter++; // Adds 1 to the counter.
LtClickButton.Enabled = true;
TxtBox.Clear(); // Clears the text box.
}
}