Load file from stream
Leave feedback
On this page
To avoid the saving stream as a file, GroupDocs.Comparison allows you to work with file streams directly.
To work with stream, follow these steps:
- Obtain file stream.
- Pass opened source file stream to the Comparer class constructor or pass opened target file stream to the Add method.
The following code snippet shows how to load file from stream:
using GroupDocs.Comparison;
using System.IO;
// ...
using (Stream sourceStream = File.OpenRead("source.docx"))
using (Stream targetStream = File.OpenRead("target.docx"))
{
using (Comparer comparer = new Comparer(sourceStream))
{
comparer.Add(targetStream);
comparer.Compare(File.Create("result.docx"));
}
}
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.