I am sometimes amazed at the lengths people are willing to go to get the job done. Take for example the simple task of getting a date from an input field. Some months ago I was working on a site which the original contractor wasn't able to get done alone so I got to take a peek at how the big businesses do their coding.
One of the things I found was how little the previous coders knew of the .NET platform - it was really obvious that these particular coders had lots of experience with ASP 3.0 but not much with ASP.NET. An example of this was when they needed to pull a date from a textbox - they accomplished this by doing two things: First assuming that the string entered would be formatted in a particular way and second by iterating through the string picking up month, day, and year parts of the date.
I did a little scounting around the SDK docs and found a much nicer way of doing this:
Dim formatInfo As New DateTimeFormatInfo()Dim myDate As DateformatInfo.ShortDatePattern = "dd-MM-yyyy"myDate = Convert.ToDateTime(myDateTextBox.Text, formatInfo)
I am certainly no .NET god so as I am writing this I am wondering how much cool stuff I am missing in the .NET framework simply because I don't know enough about it?
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.