rspec/rules/S3363/vbnet/rule.adoc
2023-07-05 16:54:50 +02:00

61 lines
1.1 KiB
Plaintext

include::../introduction-dotnet.adoc[]
include::../why-dotnet.adoc[]
include::../how-dotnet.adoc[]
=== Code examples
==== Noncompliant code example
[source,vbnet,diff-id=1,diff-type=noncompliant]
----
Public Class Account
Public Property Id As DateTime
Public Property Name As String
Public Property Surname As String
End Class
----
==== Compliant solution
[source,vbnet,diff-id=1,diff-type=compliant]
----
Public Class Account
Public Property Id As Guid
Public Property Name As String
Public Property Surname As String
End Class
----
or
==== Noncompliant code example
[source,vbnet,diff-id=2,diff-type=noncompliant]
----
Public Class Person
<Key>
Public Property PersonIdentifier As DateTime
Public Property Name As String
Public Property Surname As String
End Class
----
==== Compliant solution
[source,vbnet,diff-id=2,diff-type=compliant]
----
Public Class Person
<Key>
Public Property PersonIdentifier As Guid
Public Property Name As String
Public Property Surname As String
End Class
----
include::../resources-dotnet.adoc[]