File tree Expand file tree Collapse file tree 4 files changed +10
-8
lines changed
cpp/VS_Snippets_CLR/IComparable`1 Example/CPP
csharp/VS_Snippets_CLR/IComparable`1 Example/CS
visualbasic/VS_Snippets_CLR/IComparable`1 Example/VB Expand file tree Collapse file tree 4 files changed +10
-8
lines changed Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff line change 6262
63638. <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
You can’t perform that action at this time.
0 commit comments