This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tutorial:genericandtemplate [2018/12/23 23:10] admin |
tutorial:genericandtemplate [2018/12/23 23:16] (current) admin [2. Generic Class] |
||
---|---|---|---|
Line 53: | Line 53: | ||
=====2. Generic Class===== | =====2. Generic Class===== | ||
- | คือการสร้าง Class ที่ใช้กับ DataType ใดๆก็ได้ ไม่เฉพาะเจาะจง | + | คือการสร้าง Class ที่ใช้กับ DataType ใดๆก็ได้ ไม่เฉพาะเจาะจง คล้ายกับ Generic Procedure/Function แค่เปลี่ยนเป็น Class เท่านั้น อย่างไรก็ตาม สำหรับ Generic Class นั้น ก่อนการนำไปใช้ จะต้องมีการสร้าง Class เป้าหมาย ขึ้นมาก่อนเสมอ รูปแบบของการประกาศและการสร้าง Class สรุปได้ดังนี้ |
^ Topic ^ Format ^ | ^ Topic ^ Format ^ |