|
What is extensively?
I have a small set of extension methods, but I use them a lot. On sealed classes.
Examples:
DBInt("columnName") - returns int value of column in a datarow, and cleans up DBNull issues.
HiddenCreditCard(CC Number String) - returns CC Number showing only first and last four digits, with asters in between.
|
|
|
|
|
I use extension methods somewhat. I'm slowly building a suite of useful methods. There is also the site extensionmethod.net too.
I keep the extension methods in a core library, but the methods are declared in the namespace of the class I'm targeting. That way, when I reference the core library all the extension methods are available without superfluous using statements.
Be careful, there is an ongoing debate on the internets about whether they're a good thing or bad thing. I would say, use sparingly, and note that an extension method is probably sign-posting a limitation in your design.
As well as other suggestions, I've used them to clean up a messy code base I've inherited. In this code base there were a number of inappropriate methods attached to a static globals class. Side-stepping the whole issue of a statics globals class, the methods attached to it were moved onto extension methods. Not a perfect solution, but migrating to extension methods helped me nudge the legacy code in the right direction.
|
|
|
|
|
|
Now for the trivia question - which episode (or episodes) did the pics come from?
My guess is Amok Time.
Marc
|
|
|
|
|
Pretty sure only the Doc would be decorating a Christmas tree.
|
|
|
|
|
Starting 28 November, I will be working in Stuttgart for the US Army.
NO MORE CODING! I won't have to touch any web servers or nuffin like that anymore. (As far as I know)
Nothing but SA/DBA things to do.
|
|
|
|
|
GenJerDan wrote: Nothing but **/DBA things to do.
So you will be backing up backups of backups
|
|
|
|
|
Probably.
I should get one of the beep-beep-beep-beep things so people will know when I'm backing up.
|
|
|
|
|
|
First Pokemon and now Admon.
Good luck.
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|
|
GenJerDan wrote: NO MORE CODING
Only scripting then?
...and wte does IGMO mean?
"Go forth into the source" - Neal Morse
|
|
|
|
|
Well, being the Lounge, I decided to replace the F with an *.
Google will tell you what FIGMO means...except they'll be wrong. "Elephant it, got my orders."
|
|
|
|
|
Thanks! It's always good to learn another useful acronym!
"Go forth into the source" - Neal Morse
|
|
|
|
|
BOHICA gets a lot of use, too.
|
|
|
|
|
That's a good explanation. I googled for "IGMO", and it did not seem to fit
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Are dentists afraid of molar bears?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I'm sure you're going to be enamelled with all the responses you're going to receive.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Is that your crowning glory?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Biting sarcasm, I love it!
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Ain't that the tooth!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
|
I actually use that term. Usually, dang gum it.
Mongo: Mongo only pawn... in game of life.
|
|
|
|
|
It is, tis a fine way to put a dentin someone's ego.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Aye, and give him the brush off!
/ravi
|
|
|
|
|
Give 'em something to abscess over.
|
|
|
|