Home > Back-end >  The Set type <T> T [] array, want to write a generic class, but generic array can't open
The Set type <T> T [] array, want to write a generic class, but generic array can't open

Time:11-04

CodePudding user response:

Have a great god can see how to deal with, wrote a string of, also want to make this method can turn the base type such as int, char array

CodePudding user response:

Set itself to bring their own array method,,, you this is clearly gild the lily, and most important, generic type T can use any kind of reference types to replace, but are not allowed to use basic types, such as int, double, char, Boolean, etc is not allowed,
  • Related