From 788baeead3ad76f46c74724ff092d01b8482830a Mon Sep 17 00:00:00 2001 From: Mahmoud Feshar <104142801+mahfeshar@users.noreply.github.com> Date: Sat, 31 Jan 2026 19:17:39 +0200 Subject: [PATCH] Fix equality check between sb1 and sb2 Corrected the comparison result of sb1 and sb2 to reflect that they are equal. --- snippets/csharp/System.Text/StringBuilder/Capacity/cap.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snippets/csharp/System.Text/StringBuilder/Capacity/cap.cs b/snippets/csharp/System.Text/StringBuilder/Capacity/cap.cs index 440a85624ba..41368d0ecd6 100644 --- a/snippets/csharp/System.Text/StringBuilder/Capacity/cap.cs +++ b/snippets/csharp/System.Text/StringBuilder/Capacity/cap.cs @@ -58,7 +58,7 @@ Ensure sb1 has a capacity of at least 50 characters. b1) sb1.Length = 3, sb1.Capacity = 50 b2) sb2.Length = 3, sb2.Capacity = 16 b3) sb1.ToString() = "abc", sb2.ToString() = "abc" -b4) sb1 equals sb2: False +b4) sb1 equals sb2: True Set the length of sb1 to zero. Set the capacity of sb2 to 51 characters. @@ -68,4 +68,4 @@ Set the capacity of sb2 to 51 characters. c3) sb1.ToString() = "", sb2.ToString() = "abc" c4) sb1 equals sb2: False */ -// \ No newline at end of file +//