@IP , as Bruce said, we could set public property and public method to get the value from the dll.
I make a code example for you and hope it could help you.
New.dll:(.NET Framework Class Library)
namespace New
{
public class Example
{
public string Getvalue { get; set; }
public void SendData()
{
if(condition)
{
string m_sDataSent = "Hello";
Getvalue = m_sDataSent;
}
}
}
}
Winform project:
private void button1_Click(object sender, EventArgs e)
{
Example example = new Example();
example.SendData();
textBox1.Text = example.Getvalue;
}
After clicking the button, the textbox will show "Hello" text.
Best Regards,
Jack
If the answer is the right solution, please click "Accept Answer" and upvote it.If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.