Login or Sign Up to become a member!
LessThanDot Sit Logo

LessThanDot

Enterprise Developer

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot friendfeed Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Your profile

Search

XML Feeds

Google Ads

« Microsoft bans memcpy() to minimize buffer overflowsMicrosoft Enterprise Developer Conference Overview »
comments
Rate Post:
submit to reddit Digg!FacebookDotnetkicks

Life can be so simple sometimes but you just have to think about it.

I found it very cool when Sean Feldman posted this CategoryAttribute. Yeah I know the title doesn't say everything and the post iskinda short but very sweet to me. More DRYness to play with.

Now let me translate his post into VB.Net.

How not to do it.

  1. <Category("Integration")> _

How to do it.

  1. <Category(Categories.Integration)> _

where Categories is a sealed class with constants

  1. Namespace NUnitCategories
  2.     Public NotInheritable Class Categories
  3.         Public Const Integration As String = "Integration"
  4.     End Class
  5. End Namespace

About the Author

User bio imageChristiaan is a forensic technician who programs on the side, although my function description says that I do IT-things for 90% of the time . I'm an avid VB.NET fan and I use lots of the ALT.Net techniques, like unit-testing, nhibernate, logging, IoC, ...
Social SitingsTwitterLinkedInHomePageLTD RSS Feed
1342 views
submit to reddit Digg!FacebookDotnetkicks

Comments and Feedback

No feedback yet

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)