Diff
checker
Text
Text
Images
Documents
Excel
Folders
Legal
Enterprise
Desktop
Pricing
Sign in
Download Diffchecker Desktop
Compare text
Find the difference between two text files
Tools
History
Real-time editor
Hide whitespace changes
Hide unchanged lines
Disable line wrap
Layout
Split
Unified
Diff precision
Smart
Word
Char
Text styles
Change appearance
Syntax highlighting
Choose syntax
Ignore
Transform text
Go to first change
Edit input
Diffchecker Desktop
The most secure way to run Diffchecker. Get the Diffchecker Desktop app: your diffs never leave your computer!
Get Desktop
C# diff example
Created
2 years ago
Diff never expires
Clear
Export
Share
Explain
18 removals
Lines
Total
Removed
Characters
Total
Removed
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
26 lines
Copy
3 additions
Lines
Total
Added
Characters
Total
Added
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
15 lines
Copy
if (!foo.Bar.HasValue)
if (!foo.Bar.HasValue)
{
{
#region stuff
#region stuff
Copy
Copied
Copy
Copied
stuff
= Baz(foo);
singleStuff
= Baz(foo);
if (
stuff?.Count != 1
)
if (
singleStuff == null
)
{
{
Copy
Copied
Copy
Copied
if (stuff?.Count > 1)
request.State = Type.TYPE_NONE.Id;
{
request.LastError = "stuff Has none";
foo.State = Type.TYPE_MULTIPLE.Id;
Logger.Warn($"stuff Has none");
request.LastError = "stuff Has multiple";
Logger.Warn($"stuff Has multiple {stuff?.Count}");
}
else
{
request.State = Type.TYPE_NONE.Id;
request.LastError = "stuff Has none";
Logger.Warn($"stuff Has none");
}
continue;
continue;
}
}
#endregion
#endregion
Copy
Copied
Copy
Copied
var singleStuff = stuff.Single();
}
}
Copy
Copied
Copy
Copied
Saved diffs
Original text
Open file
if (!foo.Bar.HasValue) { #region stuff stuff = Baz(foo); if (stuff?.Count != 1) { if (stuff?.Count > 1) { foo.State = Type.TYPE_MULTIPLE.Id; request.LastError = "stuff Has multiple"; Logger.Warn($"stuff Has multiple {stuff?.Count}"); } else { request.State = Type.TYPE_NONE.Id; request.LastError = "stuff Has none"; Logger.Warn($"stuff Has none"); } continue; } #endregion var singleStuff = stuff.Single(); }
Changed text
Open file
if (!foo.Bar.HasValue) { #region stuff singleStuff = Baz(foo); if (singleStuff == null ) { request.State = Type.TYPE_NONE.Id; request.LastError = "stuff Has none"; Logger.Warn($"stuff Has none"); continue; } #endregion }
Find difference