Click here to Skip to main content
15,881,092 members

Articles by ChunkyStool (Tip/Tricks: 4)

Tip/Tricks: 4

RSS Feed

Average article rating:

No articles have been posted.

Average blogs rating:

No blogs have been submitted.

Average tips rating: 3.94

Programming Languages
C#
30 May 2011   Updated: 30 May 2011   Rating: 2.83/5    Votes: 3   Popularity: 1.35
Licence: CPOL    Views: 28,784     Bookmarked: 2   Downloaded: 0
Please Sign up or sign in to vote.
Here are a couple of my favorite extension methhods. What are yours?
12 Sep 2011   Updated: 15 Sep 2011   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: CPOL    Views: 9,460     Bookmarked: 1   Downloaded: 0
Please Sign up or sign in to vote.
The alternative posted by Daaron does not work for several cases. E.g. Sign is included (+ or -), text contains whitespace prefix or suffix, etc. You could fix the first two limitations with a more detailed regex like "(^\s*(-|\+)?\d+\s*$)" but you could still end up with a value that won't fit...
Visual Basic
8 Mar 2011   Updated: 12 Sep 2011   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: CPOL    Views: 6,870     Bookmarked: 1   Downloaded: 0
Please Sign up or sign in to vote.
In C#, I just call ToString to get the name. It's quicker and dirtier...namespace EnumTest{ using System; using System.Linq; enum ListOfChoices : int { Yes, No, Possibly, Never, Pass } class Program { ...
Web Development
HTML
1 Nov 2011   Updated: 1 Nov 2011   Rating: 4.00/5    Votes: 1   Popularity: 0.00
Licence: CPOL    Views: 5,061     Bookmarked: 0   Downloaded: 0
Please Sign up or sign in to vote.
namespace ParseTests{ using System; using System.Collections.Generic; using System.Text.RegularExpressions; public static class ExtensionMethods { /// /// Extracts text from a source string that is between two specified tags. ...

Average reference rating:

No reference articles have been posted.

Average project rating:

No projects have been posted.
Software Developer Insight Global
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.