我制作了一个包含标签的自定义usercontrol.我有3个字符串属性:firstName,lastName,fullName.
如何设置标签的text = FullName?
public string firstName
{
get; set;
}
public string lastName
{
get; set;
}
public string fullName //this fails
{
get { return string.Format("{0} {1}", firstName, lastName); }
set { labelFullName.Text = value; }
}
Run Code Online (Sandbox Code Playgroud)