C # 2.0 About generics

zhaozj2021-02-16  55

Public Class Stack {t count;

Public void setValue (t item) {count = item;} public t getValue () {return count;}}

Private void button1_click (Object sender, eventargs e) {stack cc = new stack (); cc.setValue (1); messagebox.show (cc.getValue (). Tostring ());}

转载请注明原文地址:https://www.9cbs.com/read-18043.html

New Post(0)