c# - Accessing a Label of one project in a Class library -
i using c# remoting in 1 project named p1 , contains label ,the text of label needs changed in class library.
the problem label in p1 not getting accessed in class library , gets error stating label not defined within class
i have added reference of p1 in class library project , changed label private public label not getting accessed.
the code using below
using system; using system.collections.generic; using system.linq; using system.text; using p1; //referenced project using system.windows.forms; namespace remoteobject { public class class1 : marshalbyrefobject { public class1() { } public void setplayername() { class2 bs = new class2(); //class2 contains label bs.bowlsumteamname.text = "new text"; //here error coming. } } }
can please help me problem , code if possible..
c# label class-library
No comments:
Post a Comment