What's Changed?
OutputToDataTable Method
Example 



KellermanSoftware.WhatsChanged Namespace > OutputDataTableLogic Class : OutputToDataTable Method
Output the comparison result to a data table
Syntax
Public Function OutputToDataTable( _
   ByVal result As ComparisonResult _
) As DataTable
Dim instance As OutputDataTableLogic
Dim result As ComparisonResult
Dim value As DataTable
 
value = instance.OutputToDataTable(result)
public DataTable OutputToDataTable( 
   ComparisonResult result
)
public:
DataTable^ OutputToDataTable( 
   ComparisonResult^ result
) 

Parameters

result
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 = "This line was deleted.\r\nThis line is the same.\r\nThis line is a changed.";
string changed = "This line is the same.\r\nThis line was changed.\r\nThis line was added.";
 
ComparisonResult result = compareLogic.CompareStrings(original, changed);
 
//Output to DataTable
OutputDataTableLogic outputLogic = new OutputDataTableLogic();
DataTable dataTable = outputLogic.OutputToDataTable(result);
Dim compareLogic As New CompareLogic() 'Trial Mode
'CompareLogic compareLogic = new CompareLogic("place user name here", "place license key here"); //License Mode
 
'Compare two strings
Dim original As String = "This line was deleted." & vbCrLf & "This line is the same." & vbCrLf & "This line is a changed."
Dim changed As String = "This line is the same." & vbCrLf & "This line was changed." & vbCrLf & "This line was added."
 
Dim result As ComparisonResult = compareLogic.CompareStrings(original, changed)
 
'Output to DataTable
Dim outputLogic As New OutputDataTableLogic()
Dim dataTable As DataTable = outputLogic.OutputToDataTable(result)
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

OutputDataTableLogic Class
OutputDataTableLogic Members