What's Changed?
OutputToStream Method (OutputTextLogic)
Example 



KellermanSoftware.WhatsChanged Namespace > OutputTextLogic Class : OutputToStream Method
Syntax
Public Sub OutputToStream( _
   ByVal result As ComparisonResult, _
   ByVal outputStream As Stream _
) 
Dim instance As OutputTextLogic
Dim result As ComparisonResult
Dim outputStream As Stream
 
instance.OutputToStream(result, outputStream)
public void OutputToStream( 
   ComparisonResult result,
   Stream outputStream
)
public:
void OutputToStream( 
   ComparisonResult^ result,
   Stream^ outputStream
) 

Parameters

result
outputStream
Example
CompareLogic compareLogic = new CompareLogic(); //Trial Mode
//CompareLogic compareLogic = new CompareLogic("place user name here", "place license key here"); //License Mode
 
//Compare two strings
File.WriteAllText("original.txt", "This line was deleted.\r\nThis line is the same.\r\nThis line is a changed.");
File.WriteAllText("changed.txt", "This line is the same.\r\nThis line was changed.\r\nThis line was added.");
 
ComparisonResult result = compareLogic.CompareFiles("original.txt", "changed.txt");
 
//Output to Text
OutputTextLogic outputLogic = new OutputTextLogic();
outputLogic.OutputToFile(result, "OutputTextTest.txt");
 
//Show the file in the default viewer
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = "OutputTextTest.txt";
proc.Start();
Dim compareLogic As New CompareLogic() 'Trial Mode
'CompareLogic compareLogic = new CompareLogic("place user name here", "place license key here"); //License Mode
 
'Compare two strings
File.WriteAllText("original.txt", "This line was deleted." & vbCrLf & "This line is the same." & vbCrLf & "This line is a changed.")
File.WriteAllText("changed.txt", "This line is the same." & vbCrLf & "This line was changed." & vbCrLf & "This line was added.")
 
Dim result As ComparisonResult = compareLogic.CompareFiles("original.txt", "changed.txt")
 
'Output to Text
Dim outputLogic As New OutputTextLogic()
outputLogic.OutputToFile(result, "OutputTextTest.txt")
 
'Show the file in the default viewer
Dim proc As New System.Diagnostics.Process()
proc.StartInfo.FileName = "OutputTextTest.txt"
proc.Start()
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

OutputTextLogic Class
OutputTextLogic Members