*Just below is my winform client inst with one parameter constructor within the class.*
private void button1_Click(object sender, EventArgs e)
{
string s1 = textBox1.Text;
int x1 = Convert.ToInt32(s1);
int X= x1;
ExternalTest ob = new ExternalTest(X);
string s2 = Convert.ToString(ob.Y);
ob.Y = 0;
textBox2.Text = s2;
And below this is my class that i added to the project The code below is an added class within the assembly. If i tried to make it a class library and and add addreference - it will not build.
class ExternalTest
{
private int _x;
// protected new int x
// {
// get { return _x; }
// set {_x = value ;}
// }
private int y;
public int Y
{
get {return y = Mult(_x); }
set { }
}
internal int Mult(int _x)
{
y = _x + 51;
return y;
}
public ExternalTest(int X)
{
_x = X;
}
}
}