Pass the Value to Class Library

Jul 29 2020 7:56 AM
Hi All, 
 
I have developed a .NEt windows form application and a class library
 
Namespace for Form1 - TestSetup
Namespace for Class1.cs - TestClass
 
I have a textbox in my Windows form application, whatever the text in the textbos I need to pass it the calss library.
 
So I did like this, 
 
using TestSetup ;
 
Form1 form = new Form1();
string installationpath = form.installationpath;
 
string outputpath = installationpath;
 
 
Calling the class from the Windows form as following 
 
 
TestClass sh = new TestClass();
TestClass.GenericResult result = sh.AddVPrinter(textBox1.Text, textBox1.Text);
 
 When I am executing the program it's giving the error, syaing the value outputpath is null..

Answers (3)