Entries Tagged as ''

My Tweets on 2008-08-01

Fucking Nulls…. i swear! (Literally =)

Man, .net pisses me off when it comes to null values. I like the fact that I can test for them, but to have to account for them? lame.

Probably due to me coding at 5 in the morning than stoopid .net, but I implemented a new regex in a very commonly used function, and everything started throwing, "can’t parse null" errors. I was also working on a couple other areas of the site, so I wasn’t sure exactly what I did that broked everything. I wound up just saying, "fuck it" and going to bed.

First thing this morning, I throw a "If Not strValue Is Nothing Then" wrapper around my RegEx, and bam! All better.

That phrase doesn’t even make sense. Use of double-negatives in a stoopid order is stoopid. =)

If Not strValue Is Nothing Then
	strValue = System.Text.RegularExpressions.Regex.Replace(strValue, "RedExHere", String.Empty, RegexOptions.IgnoreCase)
End If

.: Adam