In
Requires Free Membership to View
When you register, you'll begin receiving targeted emails from my team of award-winning writers. Our goal is to provide a unique online resource for developers, architects and development managers tasked with building and maintaining enterprise applications using Visual Basic, C# and the Microsoft .NET platform.
Hannah Smalltree, Editorial Director
this.myUserControl.NameArray[0] = "Alan"; Console.WriteLine(this.myUserControl.NameArray[1]);How do I write this property?
This is a simple task of creating an array of strings containing the text contained in the textboxes. You can achieve a property by using a property like the one below:
public string[] Names
{
get
{
return new string[] {tbName1.Text, tbName2.Text, tbName3.Text};
}
}
This was first published in October 2004