i got this error
"
The runtime has encountered a fatal error. The address of the error was at 0x60059ddd, on thread 0xb6c. The error code is 0x80131623. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.
"
in my code .
my code is
like this
TextRange range;
FileStream fStream;
range = new TextRange(staticLogTxtBox.Document.ContentStart, staticLogTxtBox.Document.ContentEnd);
fStream = new FileStream(logFilePath, FileMode.Create);
range.Save(fStream, DataFormats.Text);