a strange problem,please help me!!

My .net is vs2003,the version of netframework is 1.1.4322

recently I began to program in intelligent device,using c# on pocket pc 2002 simulator.but file operations always have problems,for example:

private void button2_Click(object sender, System.EventArgs e)

{
StreamWriter SW;
SW=File.CreateText("c:\\shiyan.txt");
SW.WriteLine("123");
SW.WriteLine("345");
SW.Close();

}

unhandled exception: System.IO.DirectoryNotFoundException:

but this code run well in pure windows programs.Only in simulator can it have such problems.the file tpye of my harddisc is fat32.

another question is:

MessageBox.Show(this, "保存成功!", "tips",MessageBoxButtons.OK,MessageBoxIcon.Question, MessageBoxDefaultButton.Button1,MessageBoxOptions.RightAlign);

========
can't find type or namespace“MessageBoxOptions”(是否缺少 using 指令或程序集引用?)

how can this be possible what shall I do



Answer this question

a strange problem,please help me!!

  • Jeff Levinson

    thank you very much!

    ~!


  • Nille

    you don't want the the "c:\", just "\shiyan.txt" - you might need "\\shiyan.txt"
  • esloat

    thank you.

    How can I notice the difference between programing in Inteligent Device and others I found that some methods that run well in other programs can't run in the enviroment of Inteligent Device .Is there some articles discussing the differences between different versions of .net framework,especially compact .net framework and others


  • cpaw88

    MSDN is a wonderful resource. This should get you started.

    http://msdn.microsoft.com/netframework/programming/netcf/default.aspx



  • a strange problem,please help me!!