Another Priceless WTF
I've seen some really bad code - but this takes the cake .
Friend ReadOnly Property CheckUserRole() As Boolean
Get
Dim user As SystemUser = SystemUser.CurrentUser
If user.AssertRole(RoleTypes.Admin) Then
Return 0
Else
If user.AssertRole(RoleTypes.Training) Then
Return 1
Else
If user.AssertRole(RoleTypes.Supervisor) Then
Return 2
End If
End If
End If
End Get
End Property
There's no GD excuse from trash like this. NONE. VB.NET - (Option Strict On) = VB6 . Why even write in .NET without Option Strict On? As soon as the guy that wrote this cashed his paycheck he should have been arrested for THEFT.
But the money quote is this:
<<Isn't it incredible how many run-time mysteries become compile-time wavy underlines with circles and arrows and flashing lights and sound effects when you use Option Explicit/Option Strict?
>>