H
hassanmushtaq
hi
i am using VS 2003 (C#) in CF 1.0. i have a problem in writing file.
as i m developing in C# having CF 1.0. i have installed pocket pc 2003
emulator on microsoft site. now as my application write a file that
works fine on the emulator. and all things r working well. when i
installed it in Windows Mobile 5.0. it neither working correctly. also
it is not writing a file. and it give me no exception while
writing.....
my code is shown as below
File.Delete(cShared.objcClient.CurrentPath + "\\" +
cShared.objcClient.username +".txt");
using(Stream stream = File.Open(cShared.objcClient.CurrentPath + "\
\" + cShared.objcClient.username
+".txt",FileMode.OpenOrCreate,FileAccess.Write))
{
StreamWriter filewriter = new StreamWriter(stream);
string group="";
foreach(string grp in cShared.objcClient.GroupUsers.Keys)
{
group += grp +"~";
}
group = group.Substring(0,group.Length-1);
filewriter.WriteLine(group);
filewriter.Flush();
foreach(string grp in cShared.objcClient.GroupUsers.Keys)
{
string grpuser="";
if(cShared.objcClient.GroupUsers[grp].ToString() != "")
{
grpuser += grp + "*" +
cShared.objcClient.GroupUsers[grp].ToString();
filewriter.WriteLine(grpuser);
filewriter.Flush();
}
}
filewriter.Close();
}
it is working fine on emulator but not on device itself.
plz give me some suggestion.......
regardz
hassan mushtaq
i am using VS 2003 (C#) in CF 1.0. i have a problem in writing file.
as i m developing in C# having CF 1.0. i have installed pocket pc 2003
emulator on microsoft site. now as my application write a file that
works fine on the emulator. and all things r working well. when i
installed it in Windows Mobile 5.0. it neither working correctly. also
it is not writing a file. and it give me no exception while
writing.....
my code is shown as below
File.Delete(cShared.objcClient.CurrentPath + "\\" +
cShared.objcClient.username +".txt");
using(Stream stream = File.Open(cShared.objcClient.CurrentPath + "\
\" + cShared.objcClient.username
+".txt",FileMode.OpenOrCreate,FileAccess.Write))
{
StreamWriter filewriter = new StreamWriter(stream);
string group="";
foreach(string grp in cShared.objcClient.GroupUsers.Keys)
{
group += grp +"~";
}
group = group.Substring(0,group.Length-1);
filewriter.WriteLine(group);
filewriter.Flush();
foreach(string grp in cShared.objcClient.GroupUsers.Keys)
{
string grpuser="";
if(cShared.objcClient.GroupUsers[grp].ToString() != "")
{
grpuser += grp + "*" +
cShared.objcClient.GroupUsers[grp].ToString();
filewriter.WriteLine(grpuser);
filewriter.Flush();
}
}
filewriter.Close();
}
it is working fine on emulator but not on device itself.
plz give me some suggestion.......
regardz
hassan mushtaq