Hi all,
I have a very easy question (I think, at least), but I can't for the life of me figure it out, which makes me feel stupid.
I'm trying to make a function to generate buttons (I have quite a few buttons in my app and don't want to write them all out). So I have this:
private void buttonGenerator(string name, string text, int height, int width, int top, int left)
{
Button[name] = new Button();
}
But my problem is this: How do I access the content of variable "name" instead of creating a load of buttons, all called name?
Thanks for the help, and sorry for the newb-question.