System.Windows.Forms.Control.CompanyName? Posted on August 22, 2007 @ 03:47 csharp
This messed me up a bit... I have a view that has a property called "CompanyName"
public interface ICaptureCompanyDetailsView
{
string CompanyName { get; }
...
When my presenter was actually getting the company it was not getting stored as what I intended, because I had not implemented the "CompanyName" property on my actual view.
How did this compile?... It turns out that System.Windows.Forms.Control has a property called "CompanyName". Hmm...
![]()
The temporary solution... C# Shadow Field! (Notice the 'new' keyword)
public new string CompanyName
{
get { return uxCompanyNameTextBox.Text; }
}