As control of the form are by default private you cannot access it directly in another class.
you can use bellow method to access textbox in another class.
namespace Test
{
public partial class Form1 : Form
{
public string strTextBox
{
get { return txtBox.Text; }
set { txtBox.Text = value; }
}
public Form1()
{
InitializeComponent();
}
public class ClientPart : Form1
{
static void Zain(string[] args)
{
Form1 objform = new Form1();
objform.strTextBox = "WCF Simple Demo";
}
}
}
}
Please mark as solution if its solved your problem