C# Generic

Amos Xia, 2018-04-30 13:28:12


Official Site C# Generic

Generic Namespace

  • System.Collections.Generic

Benefits

  • type-safe at compile-time, won’t cast types to and from Object class.
  • performance

Constraints

  • struct
  • class
  • new()
  • base class
  • interface

default keyword

assign default value to a parameterized type T. - reference type, return null - numeric value type, return 0 - struct type, return each member of struct initialized to zero or null depending on member type


知识共享许可协议
本作品采用知识共享署名 4.0 国际许可协议进行许可。


Copyright© 2018 s2u2m