SqlParameter and DBNull.Value - possible bug?



Is following behaviour by design or is it a bug?
For shure breaking change from framework 1.1.

Try under framework => 2.0
SqlParameter param = new SqlParameter("Test", DbType.Int32);
Console.WriteLine("Value: {0}, Type: {1}",param.Value, param.DbType);
param.Value = DBNull.Value;
Console.WriteLine("Value: {0}, Type: {1} --- WTF",param.Value, param.DbType);
Console.ReadLine();
.



Relevant Pages

  • Re: OODesign - OPF, design pattern
    ... What I had in mind were very specific design patterns, ... It's under their control, for goodness ... but once I had reached a point where I could stop "tweaking" the framework to handle scenarios that I hadn't previously thought of the development time suddenly increased dramatically. ... once you zoom in even just a little, OO design reveals more layers. ...
    (borland.public.delphi.non-technical)
  • Re: Books / Articles on Embedded SW Architecture
    ... and dirty patches must be done to already fixed architecture. ... decomposition, then there was a problem with the decomposition. ... just a decent framework from which the rest of the edifice of the ... They don't get to do the design or the decomposition. ...
    (comp.arch.embedded)
  • Re: The structure of PHP/Web Application coding.
    ... From your mentioning of Design Patterns i assume you want to/are practicing OOP. ... Refactoring should start allmost immediately from the start of any project and is to be done so frequently that it comes close to being done "all te time". ... IMHO a framework is simply the outcome of applying the principles of XP over the development of several similar applications. ...
    (comp.lang.php)
  • Re: OODesign - OPF, design pattern
    ... What constantly kept getting in my way was the fact, that UI controls ... is exactly what it takes - writing wrappers and reinventing. ... The truth is, that once you have written an adapter framework for your favourite widget set, you have written it once and for all; it gets used over and over again. ... OPFs are but a small part of OO design. ...
    (borland.public.delphi.non-technical)
  • Re: The structure of PHP/Web Application coding.
    ... From your mentioning of Design Patterns i assume you want to/are ... Refactoring is improving the design of existing code. ... IMHO a framework is simply the outcome of applying ...
    (comp.lang.php)