Problem : you can not access members of other class, even if they are declared as public
.
Solution : you should access other class memebers
with the help of instance variable
.
Note: if you can provide more details/code we could help you in much better way.
Try This: Sample
Class A
{
public void addToListViewMedia()
{
listViewMedia.Items.Add(new ListViewItem("datafromotherfile"));
}
}
Class B
{
private void ausführenButton_Click(object sender, EventArgs e)
{
A obj=new A(); //create instance variable.
obj.addToListViewMedia();//access methods of A using instance variable
}
}