• Unit in css

    All length units can be expressed as either positive or negative numbers followed by a label (although some properties will accept only positive numbers). You can also use real numbersthat is, numbers with decimal fractions, such as 10.5 or 4.561. All length units are followed by a two-letter abbreviation that represents the actual unit of length being specified, such as in (inches) or pt (points). The only exception to this rule is a length of 0 (zero), which need not be followed by a unit.

  • Make IE more css2.1 compliant

    Check here

  • Nullable and ?? Operator

    After reading the article, The C# ?? null coalescing operator (and using it with LINQ), I did a quick test like the following code. It seems the compiler does different thing for Nullabe type, and other reference type with ?? operator. In fact, ?? should not be called operator, it is shortcut for compiler instruction. It will be more effective to use "t1.GetValueOfDefault()" than "t1 ?? 0" . But latter seems more language built-in feature than API.

  • Generic method

    The following code shows some example of generic method

    //the T can be inferred from the type of input parameter
    public static T DoByInferType<t>(T input)
    {
        return default(T);
    }
    
    
  • Using user style sheet to modify the style of a web site

    I tried to modify the style by using user style sheet. But some of style just could not take effect. I seemingly forget the basic rule of css cascade. The cascade works in the following order of importance: