Please help me i can't use txtBox from the other classes.
//call
txtbox.text = myclass.bla();
//some other class
public class myclass
{
public static string bla()
{
return "bla";
}
}
I will need more clear answer when you get to your PC please because i can't understand what you posted. And thanks a lot for your helpQuote:
sry i'm currently on my mobile phone..PHP Code://call
txtbox.text = bla();
//some other class
public class myclass
{
public static string bla()
{
return "bla";
}
}
namespace LabelTest
{
public partial class TestForm : Form
{
// get and set method for Label.Text
public string _Label
{
get
{
// Return Label.Text
return Label.Text;
}
set
{
// Set Label.Text with value
Label.Text = value;
}
}
public TestForm()
{
InitializeComponent();
}
}
class OtherClass
{
public void ChangeLabel()
{
// String with Text for Label
string setThisText = "Bla";
// Empty string
string getThisText;
// Attribute of Form
TestForm Test = new TestForm();
// Set method
Test._Label = setThisText;
// Get method (getThisText is now "Bla"
getThisText = Test._Label;
}
}
}