Venkat S

Venkat S

  • 1.5k
  • 234
  • 202.7k

windows mobile pocket pc application in vs2008 i get null refference exception

Jun 10 2011 1:41 AM
hi friends,

i am new for develop window mobile pocket pc.
using vs 2008 .

i try to bind xml data in to combobox at that time i get Null reference exception

i m using data set
bellow is my code .

<pre lang="cs">string path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
            DataSet ds = new DataSet();           
            ds.ReadXml(path + @\Refrigirater.xml);
            try
            {
                comboBox1.DataSource = ds;
                comboBox1.DisplayMember = <val1>;
                comboBox1.ValueMember = <val2>;
            }
            catch (NullReferenceException)
            {
                MessageBox.Show(null exception);
            }
           </pre>

please give me any idea to resolve it.


Thanks
Venkat.S


Answers (1)