What's Changed?
CompareWords Method (CompareLogic)
Example 



KellermanSoftware.WhatsChanged Namespace > CompareLogic Class : CompareWords Method
The original sentence
The changed sentence
Split the strings into words by the space character and compare
Syntax
Public Function CompareWords( _
   ByVal original As String, _
   ByVal changed As String _
) As ComparisonResult
Dim instance As CompareLogic
Dim original As String
Dim changed As String
Dim value As ComparisonResult
 
value = instance.CompareWords(original, changed)
public ComparisonResult CompareWords( 
   string original,
   string changed
)
public:
ComparisonResult^ CompareWords( 
   String^ original,
   String^ changed
) 

Parameters

original
The original sentence
changed
The changed sentence

Return Value

The result of the comparison
Example
CompareLogic compareLogic = new CompareLogic(); //Trial Mode
//CompareLogic compareLogic = new CompareLogic("place user name here", "place license key here"); //License Mode
 
//Compare two strings
string original = "The quick brown fox jumped over the lazy dog.";
string changed = "The quick brown fox jumps over the lazy dog.";
 
ComparisonResult result = compareLogic.CompareWords(original, changed);
 
//Output to HTML, also can export to CSV, or DataTable
OutputHtmlLogic outputLogic = new OutputHtmlLogic();
outputLogic.OutputToFile(result, "CompareWordsTest.html");
 
//Show the file in the browser
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = "CompareWordsTest.html";
proc.Start();
Dim compareLogic As New CompareLogic() 'Trial Mode
'Dim compareLogic As New CompareLogic("place user name here", "place license key here") 'License Mode
 
'Compare two strings
Dim original As String = "The quick brown fox jumped over the lazy dog."
Dim changed As String = "The quick brown fox jumps over the lazy dog."
 
Dim result As ComparisonResult = compareLogic.CompareWords(original, changed)
 
'Output to HTML, also can export to CSV, or DataTable
Dim outputLogic As New OutputHtmlLogic()
outputLogic.OutputToFile(result, "CompareWordsTest.html")
 
'Show the file in the browser
Dim proc As New System.Diagnostics.Process()
proc.StartInfo.FileName = "CompareWordsTest.html"
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

CompareLogic Class
CompareLogic Members