It's just a possibility that may or may not be appropriate.
For example, instead of:
somehorriblelongnameyoudontwanttoretype.methodone( )
somehorriblelongnameyoudontwanttoretype.methodtwo( )
somehorriblelongnameyoudontwanttoretype.methodthre e()
somehorriblelongnameyoudontwanttoretype.methodfour ()
You *could* just call a new method:
YourMethod(somehorriblelongnameyoudontwanttoretype )
and then the new method defined as:
Public Sub YourMethod(ByVal activeobject As Whatever)
activeobject.methodone()
activeobject.methodtwo()
activeobject.methodthree()
activeobject.methodfour()
End Sub
--
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C#/VB to C++ converter
C# Code Metrics: Quick metrics for C#
"Mr Flibble" wrote:
* David Anton wrote:
Also see:
http://www.tangiblesoftwaresolutions...0VB%20With.htm
(excuse the product plug at the bottom)
Basically, the gist of it is that "With" is no better than an abbreviated
variable named "x" - it's obscure and also implies somehow that the block
centers around the object being With'ed (when it really just centers around
something you didn't want to re-type).
" Another alternative is to refactor so that the With block is a new
method with the object passed in as a parameter. You can use a reduced
parameter name length (without making it obscure)."
How do you reduce the parameter name length? can you give me an example?
Cheers,
Signore Flibble