Bruce Ge

  Home  |   Contact  |   Syndication    |   Login
  6 Posts | 0 Stories | 11 Comments | 0 Trackbacks

News

Archives

Post Categories

General .NET

Although delegate type and Enum type are class types, we can not inherit from them as they are sealed classes after compile, public delegate void DelegateTestType(); //Compile time error class myTest : DelegateTestType { ... } we can not make it as a type constraint either on class or method: //Compile time error class myTest<T> where T : DelegateTestType { } From the C# 2.0 specification we can read (20.7, Constraints): A class-type constraint must satisfy the following rules: ยท The type must...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati