I have a method which name is:
public void OnPublic(UserInfo user, string channel, string message)
And the method which handles a button click:
private void button1_Click(object sender, EventArgs e)
Now, how could I access the string channel of the method OnPublic on button1_Click?
Thanks, I’m a beginner in C# 🙂
When your
OnPublicmethod is called you can store a reference to the string in a private field and then you can later access it from the other method in your class.