diff --git a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.choosingdates/cs/datetimereplacement1.cs b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.choosingdates/cs/datetimereplacement1.cs index a909c3e5e643c..2c9c0e1c618c1 100644 --- a/samples/snippets/csharp/VS_Snippets_CLR/conceptual.choosingdates/cs/datetimereplacement1.cs +++ b/samples/snippets/csharp/VS_Snippets_CLR/conceptual.choosingdates/cs/datetimereplacement1.cs @@ -34,7 +34,7 @@ public bool IsOpenAt(TimeSpan time) storeDelta = tz.GetAdjustmentRules()[tz.GetAdjustmentRules().Length - 1].DaylightDelta; TimeSpan comparisonTime = time + (offset - tz.BaseUtcOffset).Negate() + (delta - storeDelta).Negate(); - return comparisonTime >= open & comparisonTime <= close; + return comparisonTime >= open && comparisonTime <= close; } } } @@ -66,7 +66,7 @@ public static void Main() // The example displays the following output: // Store is open now at 15:29:01.6129911: True // Store is open at 08:00:00: True -// Store is open at 21:00:00: False +// Store is open at 21:00:00: True // Store is open at 04:59:00: False -// Store is open at 18:31:00: False +// Store is open at 18:31:00: True //