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: Updating vb6/vba knowledge - too late to teach old dog new tricks?
    ... is a programming paradigm that uses "objects" and their interactions to design applications and computer programs. ... What is Unified Modeling Language? ... LINQ is a Microsoft .NET Framework component that adds native data querying capabilities to .NET languages. ... Microsoft LINQ defines a set of query operators that can be used to query, project and filter data in arrays, enumerable classes, XML, relational database, and third party data sources. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Model Check Inside - Out
    ... The use of design patterns make your application ... encapsulate operations to eliminate dependencies on specific operations. ... For example, a framework ...
    (comp.lang.misc)
  • 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)