Constraints in C## RRS feed


  • When you define a generic class, you can apply restrictions to the kinds of types that client code can use for type arguments when it instantiates your class. If client code attempts to instantiate your class with a type that is not allowed by a constraint, the result is a compile-time error. These restrictions are called constraints.

    See For More Details:

    Manish Sati
    • Marked as answer by SamAgain Tuesday, July 20, 2010 6:31 AM
    Monday, July 19, 2010 10:06 AM

All replies