Click here to Skip to main content
14,298,783 members
   

C#

 
AnswerRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
Richard MacCutchan18-Jun-19 20:46
protectorRichard MacCutchan18-Jun-19 20:46 
GeneralRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
BillWoodruff18-Jun-19 21:03
mveBillWoodruff18-Jun-19 21:03 
GeneralRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
Richard MacCutchan18-Jun-19 21:18
protectorRichard MacCutchan18-Jun-19 21:18 
GeneralRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
BillWoodruff18-Jun-19 21:54
mveBillWoodruff18-Jun-19 21:54 
GeneralRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
Richard MacCutchan18-Jun-19 21:58
protectorRichard MacCutchan18-Jun-19 21:58 
GeneralRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
BillWoodruff18-Jun-19 22:04
mveBillWoodruff18-Jun-19 22:04 
GeneralRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
Richard MacCutchan18-Jun-19 22:39
protectorRichard MacCutchan18-Jun-19 22:39 
GeneralRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
Richard Deeming19-Jun-19 0:57
mveRichard Deeming19-Jun-19 0:57 
BillWoodruff wrote:
And, if the file does not exist, I do want it to be created.

I think the FileMode enum[^] values could have been named better. Smile | :)

OpenOrCreate
If the file doesn't exist, create it.
If it does exist, do not truncate it.
Create
If the file doesn't exist, create it.
If it does exists, truncate it.

I suspect you want FileMode.Create instead of FileMode.OpenOrCreate.

However, note the warning on the Create option:
"If the file already exists but is a hidden file, an UnauthorizedAccessException exception is thrown."



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


modified 19-Jun-19 11:00am.

GeneralRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
BillWoodruff19-Jun-19 4:24
mveBillWoodruff19-Jun-19 4:24 
GeneralRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
Richard Deeming19-Jun-19 5:04
mveRichard Deeming19-Jun-19 5:04 
GeneralRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
BillWoodruff19-Jun-19 12:05
mveBillWoodruff19-Jun-19 12:05 
GeneralRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
Richard MacCutchan21-Jun-19 22:01
protectorRichard MacCutchan21-Jun-19 22:01 
GeneralRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
BillWoodruff21-Jun-19 22:09
mveBillWoodruff21-Jun-19 22:09 
GeneralRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
Richard MacCutchan21-Jun-19 22:34
protectorRichard MacCutchan21-Jun-19 22:34 
AnswerRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
F-ES Sitecore18-Jun-19 23:51
mveF-ES Sitecore18-Jun-19 23:51 
GeneralRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
BillWoodruff19-Jun-19 0:54
mveBillWoodruff19-Jun-19 0:54 
AnswerRe: some bugs don't retire II: DataContract.ReadObject fails after multiple writes to the same file Pin
Gerry Schmitz19-Jun-19 5:16
mveGerry Schmitz19-Jun-19 5:16 
QuestionSharpSphinx Pin
Member 228177115-Jun-19 3:23
memberMember 228177115-Jun-19 3:23 
AnswerRe: SharpSphinx Pin
jschell15-Jun-19 3:33
memberjschell15-Jun-19 3:33 
GeneralRe: SharpSphinx Pin
Member 228177116-Jun-19 12:15
memberMember 228177116-Jun-19 12:15 
GeneralRe: SharpSphinx Pin
jschell23-Jun-19 5:45
memberjschell23-Jun-19 5:45 
QuestionUsing SharpSphinx or PocketSphinx with C# Pin
Member 228177115-Jun-19 3:14
memberMember 228177115-Jun-19 3:14 
QuestionDrag and Drop Ms-Word,Excel Pin
Member 1370632014-Jun-19 19:45
memberMember 1370632014-Jun-19 19:45 
AnswerRe: Drag and Drop Ms-Word,Excel and PowerPoint Pin
OriginalGriff14-Jun-19 19:58
protectorOriginalGriff14-Jun-19 19:58 
GeneralRe: Drag and Drop Ms-Word,Excel and PowerPoint Pin
Member 1370632014-Jun-19 21:37
memberMember 1370632014-Jun-19 21:37 

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.