I have a string property that defines a filename for an xml file. When the user inputs this filename into the property, I have the setter calling a parseXml() function immediatly after setting 'fileName = value' to populate a dataTable with the data from the XML file so it displays in the designer. For some reason, when I have this function call in the property setter, the setter ends up getting called every twice every time I change the property, with the 2nd time being an empty string which causes an error. Why is it doing this?
public String FileName
{
get { return fileName; }
set
{
fileName = value;
parseXmlFile();
}
}