Skip to content

Commit 2d95723

Browse files
committed
Merge branch 'main' into publish-12594
2 parents 539e634 + 6e24cbf commit 2d95723

File tree

4 files changed

+10
-8
lines changed
  • samples/snippets
    • cpp/VS_Snippets_CLR/IComparable`1 Example/CPP
    • csharp/VS_Snippets_CLR/IComparable`1 Example/CS
    • visualbasic/VS_Snippets_CLR/IComparable`1 Example/VB
  • xml/System.Net.Http

4 files changed

+10
-8
lines changed

samples/snippets/cpp/VS_Snippets_CLR/IComparable`1 Example/CPP/source.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,19 @@ public ref class Temperature: public IComparable<Temperature^> {
2727
// Define the is greater than operator.
2828
bool operator>= (Temperature^ other)
2929
{
30-
return CompareTo(other) == 1;
30+
return CompareTo(other) >= 0;
3131
}
3232

3333
// Define the is less than operator.
3434
bool operator< (Temperature^ other)
3535
{
36-
return CompareTo(other) == -1;
36+
return CompareTo(other) < 0;
3737
}
3838

3939
// Define the is greater than or equal to operator.
4040
bool operator> (Temperature^ other)
4141
{
42-
return CompareTo(other) >= 0;
42+
return CompareTo(other) > 0;
4343
}
4444

4545
// Define the is less than or equal to operator.

samples/snippets/csharp/VS_Snippets_CLR/IComparable`1 Example/CS/source.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ public int CompareTo(Temperature other)
2020
// Define the is greater than operator.
2121
public static bool operator > (Temperature operand1, Temperature operand2)
2222
{
23-
return operand1.CompareTo(operand2) == 1;
23+
return operand1.CompareTo(operand2) > 0;
2424
}
2525

2626
// Define the is less than operator.
2727
public static bool operator < (Temperature operand1, Temperature operand2)
2828
{
29-
return operand1.CompareTo(operand2) == -1;
29+
return operand1.CompareTo(operand2) < 0;
3030
}
3131

3232
// Define the is greater than or equal to operator.

samples/snippets/visualbasic/VS_Snippets_CLR/IComparable`1 Example/VB/source.vb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ Public Class Temperature
2020

2121
' Define the is greater than operator.
2222
Public Shared Operator > (operand1 As Temperature, operand2 As Temperature) As Boolean
23-
Return operand1.CompareTo(operand2) = 1
23+
Return operand1.CompareTo(operand2) > 0
2424
End Operator
2525

2626
' Define the is less than operator.
2727
Public Shared Operator < (operand1 As Temperature, operand2 As Temperature) As Boolean
28-
Return operand1.CompareTo(operand2) = -1
28+
Return operand1.CompareTo(operand2) < 0
2929
End Operator
3030

3131
' Define the is greater than or equal to operator.

xml/System.Net.Http/HttpClient.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@
6262
6363
8. <xref:System.Net.Http.HttpClient.PutAsync%2A>
6464
65-
9. <xref:System.Net.Http.HttpClient.SendAsync%2A>
65+
9. <xref:System.Net.Http.HttpClient.SendAsync%2A>
66+
67+
10. <xref:System.Net.Http.HttpClient.PatchAsync%2A>
6668
6769
<xref:System.Net.Http.HttpClient> is intended to be instantiated once and re-used throughout the life of an application. Instantiating an HttpClient class for every request will exhaust the number of sockets available under heavy loads. This will result in SocketException errors. Below is an example using HttpClient correctly.
6870

0 commit comments

Comments
 (0)