Type Summary





Type Summary

   public class HttpVersion

       {

       // Constructors

          public HttpVersion();



       // Fields

          public static readonly Version Version10 = 1.0;

          public static readonly Version Version11 = 1.1;

       }


BA It's pretty odd to have a constructor in this class, isn't it? The truth is we never meant for the class to be created. If you look at the source code in ROTOR you can see that the developer never explicitly put a constructor in this source. The C# compiler added one implicitly. While this language feature may be a good thing for application developers, it is bad for library developers. This is why we have a guideline that all types should explicitly have a constructor, and in this case it should have been a private one. Also note that in C# 2.0, we added "static classes" that avoid this problem.



     Python   SQL   Java   php   Perl 
     game development   web development   internet   *nix   graphics   hardware 
     telecommunications   C++ 
     Flash   Active Directory   Windows