GotSharp? is a weblog from developers, for developers!

GotSharp.Extensions

GotSharp is proudly presenting: GotSharp.Extensions!
GotSharp.Extensions is a .NET Class Library containing extension methods and utility classes. Right now, it contains only some extension methods for the System.String and System.IO.Stream classes, and the utility class Range (with implementations Int32Range and DateTimeRange). We will keep updating it however with new functionality. Feel free to give comment [...]

Filed under:.Net, C#

Prepared Statements and the “Parameter X has no default value” error

When I stumbled upon this error “parameter @columnName has no default value”, first thing I tried was Google, of course.  When googling, I found lots of answers for this problem, but they all resulted in the following solutions:

Parameter name is different in the query and when declaring the parameter (wrong columnName, or wrong parameter assigned [...]

Tags: , , , ,

Log4Net, custom PatternLayout

I was looking for a way to add my own parsers to the PatternLayout class, and found following solution:
public class CustomPatternLayout : PatternLayout {
protected override PatternParser CreatePatternParser(string pattern) {
PatternParser parser = base.CreatePatternParser(pattern);

[...]

Filed under:.Net, C#, Examples, Tips & Tricks