Q:

Accessing Private method of other form

How to access private methods from one form to another form?
For Example I have this method in Form1:
Form1:
private void Test (){}

Then how to access that method (private void Test) in Form2 so that that values that I entered in Form2 will be sent in the method Test??
Test is a datagridview and in form 2 I have to enter Name with corresponding values in it and if I press the save button, it should be automatically save in the datagridview which in in Form1.

A:

private method is not meant to be accessed outside of its class at all. You cannot access private method if you are not in the class. 
The simplest way for your case would be to make the private method public
public void Test (){}

Alternatively, you have to make a public wrapper method to call your private method:
public void TestWrapper() {
    Test(); //if test is private
}

And then in your Form2, you should have the instance of Form1 and call the method easily like this:
//All these are inside Form2
Form1 form1 = new Form1();

//Somewhere in your code
form1.Test(); //if test is public, or
form1.TestWrapper(); //if test is private

But in all cases, the bottom line is:

You cannot call private method outside of the class.

