For some reason the support for old legacy code is still supported in the new VB.Net 2005 version. It is one thing to support it form Vb6 to VB.Net 2003, and not to mark every piece of 'smelly' code as obsolete, or give warning, but still supporting it in VS.Net 2005 + versions is not something i would vote for.
Some co-workers are even being trained at software companies by people that encourage them to use optional parameters etc......why o why
Another thing....why does vb.net chooses different keywords....overrides, shadows, overloads, mustinherit, readonly/writeonly properties on an on i just don't know who's thinking that this helps, but is just DOESN'T....
Here are some small pieces of code that could be just refactored into more neat code....
* On error resume next ==> use decent exception handling!
On error goto ErrorHandler
.... buggy code
Try ..
Catch (....)
Finally
... cool disposal
End Try
* Optional parameters ==> over method overloads
Public Sub DoStateChange(Optional ByVal enforceAll As Boolean = True)
If (enforceAll) Then
'
End If
End Sub
Public Sub DoStateChange()
DoStateChange(True)
End Sub
Public Sub DoStateChange(ByVal enforceAll As Boolean)
If (enforceAll) Then
'
End If
End Sub
Hopefully there are some people that are considering this in the feature....
Thanks.
Some co-workers are even being trained at software companies by people that encourage them to use optional parameters etc......why o why
Another thing....why does vb.net chooses different keywords....overrides, shadows, overloads, mustinherit, readonly/writeonly properties on an on i just don't know who's thinking that this helps, but is just DOESN'T....
Here are some small pieces of code that could be just refactored into more neat code....
* On error resume next ==> use decent exception handling!
On error goto ErrorHandler
.... buggy code
Try ..
Catch (....)
Finally
... cool disposal
End Try
* Optional parameters ==> over method overloads
Public Sub DoStateChange(Optional ByVal enforceAll As Boolean = True)
If (enforceAll) Then
'
End If
End Sub
Public Sub DoStateChange()
DoStateChange(True)
End Sub
Public Sub DoStateChange(ByVal enforceAll As Boolean)
If (enforceAll) Then
'
End If
End Sub
Hopefully there are some people that are considering this in the feature....
Thanks.