Skip to content

Commit

Permalink
Comment explaining C# syntax in VB.NET attribute and vice versa
Browse files Browse the repository at this point in the history
  • Loading branch information
antonioaversa committed Feb 15, 2023
1 parent 68a1463 commit bac7bf4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Expand Up @@ -52,8 +52,8 @@ class PropertiesAndFields
[DebuggerDisplay("{1 + NonexistentProperty}")] int ContainingInvalidMembers => 1; // FN: expressions not supported
}

[DebuggerDisplay("{this.ToString()}")]
[DebuggerDisplay("{Me.ToString()}")]
[DebuggerDisplay("{this.ToString()}")] // Compliant, it's a method call in C# syntax (valid when debugging a C# project)
[DebuggerDisplay("{Me.ToString()}")] // Compliant, it's a method call in VB.NET syntax (valid when debugging a VB.NET project)
[DebuggerDisplay("{Nonexistent}")] // Noncompliant
public enum TopLevelEnum { One, Two, Three }

Expand Down
Expand Up @@ -47,9 +47,9 @@ Public Class TestOnPropertiesAndFields
<DebuggerDisplay("{1 + NonexistentProperty}")> Property ContainingInvalidMembers As Integer ' FN: expressions not supported
End Class

<DebuggerDisplay("{Me.ToString()}")>
<DebuggerDisplay("{this.ToString()}")>
<DebuggerDisplay("{Nonexistent}")> ' Noncompliant
<DebuggerDisplay("{Me.ToString()}")> ' Compliant, it's a method call in VB.NET syntax (valid when debugging a VB.NET project)
<DebuggerDisplay("{this.ToString()}")> ' Compliant, it's a method call in C# syntax (valid when debugging a C# project)
<DebuggerDisplay("{Nonexistent}")> ' Noncompliant
Public Enum TopLevelEnum
One
Two
Expand Down

0 comments on commit bac7bf4

Please sign in to comment.