- Beginning C# 7 Hands-On:Advanced Language Features
- Tom Owsiak
- 68字
- 2021-07-02 15:29:14
Making parameters that are generic
Now, in the following line, enter the following:
public GenericsClass(T[] input)
As you can see, you can also make parameters that are generic like this one. This is a parameter, input is the name of it, and the type is T. So, it's a generic array.
Next, enter the following between a set of curly braces beneath the preceding line:
vals = input;
推薦閱讀
- UI設計基礎培訓教程
- Learning Real-time Processing with Spark Streaming
- Spring Cloud Alibaba微服務架構設計與開發實戰
- arc42 by Example
- 區塊鏈架構與實現:Cosmos詳解
- Hands-On Data Structures and Algorithms with JavaScript
- C和C++安全編碼(原書第2版)
- 數據庫系統原理及MySQL應用教程
- 信息技術應用基礎
- RISC-V體系結構編程與實踐(第2版)
- Android系統級深入開發
- Procedural Content Generation for C++ Game Development
- 細說Python編程:從入門到科學計算
- JBoss:Developer's Guide
- 零基礎學C語言(第4版)