string str="2";str.PadLeft(4, '0'); //结果为为 '0002';

string str="2";str.PadRight(4, '0'); //结果为为 '2000';

posted on 2020-03-25 17:42  龙族少年  阅读(380)  评论(0编辑  收藏  举报