Attention: We are retiring the ASP.NET Community Blogs. Learn more >

Travis.Net.Blog

Oh my beloved Time, where art thou?

  • Compiler Warnings vs Code Analysis

    public class Team
    {
          private IList<Athlete> athletes;
          ...
    }
    Compiler Warning: Field Team.athletes is never assigned to, and will always have its default value null.
    ( its assigned to in my mapper layer )
     
    public class Team
    {
          public Team()
          {
                athletes = null;
          }
          private IList<Athlete> athletes;
          ...
    }
    Code Analysis Warning: Team.Team() initializes field entries of type System.Collections.Generic.IList<Athlete> to null. Remove this initialization as it will be done automatically by the runtime.
     
    What am I doing wrong here?  Initializing athletes in the Team constructor to a new List<Athlete>() seems like a waste since its being set/initialized in my factory.
     
    Update: Kicks to Stuart for "setting" me right.
     

  • Test Driven Delopment Book

    Anyone have any suggestions for a book on Test Driven Development (using Nunit if possible)?  Maybe from a beginner - intermediate standpoint.

  • WebHost4Life

    WebHost4Life wants $$$ to enable an account to use ASP.NET 2.0.  Lame...
     
    /unsubscribed

  • ASP.NET DataProvider Singleton Vs. Static Vs. Instantiate When Needed

    I have seen all versions used a hundred times.  Which is the best way in a closed shop ASP.NET application using strictly SQL Server for data storage?
     
    Do you instantiate a singleton copy of the dataprovider for the entire application to use?  Or just a bunch of static methods (yuch)? Or do you instantiate the dataprovider every time needed?  Are there threading issues involved  here?  What about transactions?