File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
csharp/VS_Snippets_CLR_System/system.invalidoperationexception/cs
visualbasic/VS_Snippets_CLR_System/system.invalidoperationexception/vb Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ public Person(String fName, String lName)
16
16
public int CompareTo ( Person other )
17
17
{
18
18
return String . Format ( "{0} {1}" , LastName , FirstName ) .
19
- CompareTo ( String . Format ( "{0} {1}" , LastName , FirstName ) ) ;
19
+ CompareTo ( String . Format ( "{0} {1}" , other . LastName , other . FirstName ) ) ;
20
20
}
21
21
}
22
22
@@ -36,4 +36,4 @@ public static void Main()
36
36
// The example displays the following output:
37
37
// Jane Doe
38
38
// John Doe
39
- // </Snippet13>
39
+ // </Snippet13>
Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ Public Class Person : Implements IComparable(Of Person)
16
16
Public Function CompareTo(other As Person) As Integer _
17
17
Implements IComparable( Of Person).CompareTo
18
18
Return String .Format( "{0} {1}" , LastName, FirstName).
19
- CompareTo( String .Format( "{0} {1}" , LastName, FirstName))
20
- End Function
19
+ CompareTo( String .Format( "{0} {1}" , other. LastName, other. FirstName))
20
+ End Function
21
21
End Class
22
22
23
23
Module Example
@@ -36,5 +36,3 @@ End Module
36
36
' Jane Doe
37
37
' John Doe
38
38
' </Snippet13>
39
-
40
-
You can’t perform that action at this time.
0 commit comments