Click here to Skip to main content
15,889,595 members
Home / Discussions / C#
   

C#

 
AnswerRe: Is there a solution to this problem? (Permanent casting) Pin
Urs Enzler24-Aug-07 23:32
Urs Enzler24-Aug-07 23:32 
AnswerRe: Is there a solution to this problem? (Permanent casting) Pin
PhilipPainter27-Aug-07 11:38
PhilipPainter27-Aug-07 11:38 
Questioncopy Xml to Xml files Pin
ytubis24-Aug-07 20:44
ytubis24-Aug-07 20:44 
AnswerRe: copy Xml to Xml files Pin
Christian Graus24-Aug-07 21:10
protectorChristian Graus24-Aug-07 21:10 
AnswerRe: copy Xml to Xml files [modified] Pin
Hessam Jalali24-Aug-07 21:26
Hessam Jalali24-Aug-07 21:26 
QuestionIO problem Pin
sianatia24-Aug-07 20:16
sianatia24-Aug-07 20:16 
AnswerRe: IO problem Pin
Christian Graus24-Aug-07 21:09
protectorChristian Graus24-Aug-07 21:09 
GeneralRe: IO problem Pin
sianatia25-Aug-07 18:14
sianatia25-Aug-07 18:14 
Hi,
This is my code:
<br />
System.IO.FileStream file=System.IO.File.OpenWrite(_fileName);//file to be written<br />
System.IO.MemoryStream ms=new System.IO.MemoryStream();//in memory stream for some puspose<br />
dataset.WriteXml(ms);//write dataset into memory stream<br />
ms.Position=0;<br />
byte[] buffer=new byte[ms.Length];//create buffer<br />
ms.Position=0;<br />
ms.Read(buffer,0,buffer.Length);//read memory stream<br />
ms.Close();<br />
file.Position=0;<br />
file.SetLength(0);	//flush the main file<br />
buffer=System.Text.Encoding.UTF8.GetBytes(Encrypter.EncryptData(System.Text.Encoding.UTF8.GetString(buffer)));//encrypt data<br />
file.Write(buffer,0,buffer.Length);//write dato into main file<br />
file.Close();//close file<br />


Just one process can write on main file,other processes like backup process may read this file.
QuestionString Manipulation Pin
Senu Gandhi24-Aug-07 19:19
Senu Gandhi24-Aug-07 19:19 
AnswerRe: String Manipulation Pin
Christian Graus24-Aug-07 19:54
protectorChristian Graus24-Aug-07 19:54 
GeneralRe: String Manipulation Pin
zhongyougang@gmail.com24-Aug-07 20:56
zhongyougang@gmail.com24-Aug-07 20:56 
GeneralRe: String Manipulation Pin
PIEBALDconsult25-Aug-07 4:44
mvePIEBALDconsult25-Aug-07 4:44 
GeneralRe: String Manipulation Pin
Paul Conrad25-Aug-07 9:30
professionalPaul Conrad25-Aug-07 9:30 
JokeRe: String Manipulation Pin
Luc Pattyn24-Aug-07 23:44
sitebuilderLuc Pattyn24-Aug-07 23:44 
Questiontrigger to the client Pin
pian_christian24-Aug-07 17:04
pian_christian24-Aug-07 17:04 
AnswerRe: trigger to the client Pin
Christian Graus24-Aug-07 17:20
protectorChristian Graus24-Aug-07 17:20 
GeneralRe: trigger to the client Pin
pian_christian24-Aug-07 17:22
pian_christian24-Aug-07 17:22 
GeneralRe: trigger to the client Pin
Christian Graus24-Aug-07 18:32
protectorChristian Graus24-Aug-07 18:32 
GeneralRe: trigger to the client Pin
Dave Kreskowiak24-Aug-07 18:38
mveDave Kreskowiak24-Aug-07 18:38 
GeneralRe: trigger to the client Pin
Christian Graus24-Aug-07 19:16
protectorChristian Graus24-Aug-07 19:16 
GeneralRe: trigger to the client Pin
Dave Kreskowiak26-Aug-07 4:22
mveDave Kreskowiak26-Aug-07 4:22 
QuestionWriting Device Drivers in C#? Pin
Patricker24-Aug-07 13:23
Patricker24-Aug-07 13:23 
AnswerRe: Writing Device Drivers in C#? Pin
George L. Jackson24-Aug-07 13:44
George L. Jackson24-Aug-07 13:44 
GeneralRe: Writing Device Drivers in C#? Pin
Luc Pattyn24-Aug-07 15:21
sitebuilderLuc Pattyn24-Aug-07 15:21 
GeneralRe: Writing Device Drivers in C#? Pin
George L. Jackson24-Aug-07 15:25
George L. Jackson24-Aug-07 15:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.