Question: Can you store multiple data types in System.Array?Answer: You never use System. Array directly. You can store items whose data type is equivalent to, or derived from, the data type of the array. This means that you can store multiple data types, provided that they derive from a common base type, or implement a common interface.Example: If you want to store different types, use System.Collections.ArrayList or object[] |
保存以便复习
收藏此条目、标记为困难题,或将其加入复习集合。
这有帮助吗? 是 否
用户评价最有帮助的内容:
- Whats the advantage of using System.Text.StringBuilder over System.String?
- Can you store multiple data types in System.Array?
- Whats the difference between the System.Array.CopyTo() and System.Array.Clone()?
- How can you sort the elements of the array in descending order?
- Whats the .NET datatype that allows the retrieval of data by a unique key?