I am working on a very simple Smartphone app. I want to store 3 little application settings. I can't figure this mess out. I have beat my head against the wall trying the sample at the following link http://msdn.microsoft.com/en-us/library/ms839369.aspx
IT DOESN'T WORK!
I keep coming up with a NULLReferenceError on the following that is BOLD (xmlApplicationData) : (this is straight from the sample)
if anyone knows a better way please let me know where i can find some samples. This is the last piece ... well except for deployment. Come on how hard could that be!Code:public class ApplicationData { private const string xsdApplicationData = @"\Storage\Program Files\ISBNAnyplace\ApplicationData.xsd"; private const string xmlApplicationData = @"\Storage\Program Files\ISBNAnyplace\ISDNAnyplace.xml"; public DataSet GetAll() { // Iniate new dataset DataSet ds = new DataSet(); // Read schema and xml ds.ReadXmlSchema(xsdApplicationData); // Return the dataset regardless if ReadXml throws an exception or not // There is no dataset the first time the application runs try { ds.ReadXml(xmlApplicationData); } catch {} // Return dataset return ds; }![]()



Reply With Quote


