我正从数据库中检索一些记录,我追加到一些字符串 - 例如:
spouse counter=1;
counter=1+counter;
Run Code Online (Sandbox Code Playgroud)
然后我得到customerID以下方式:
customerID = "AGP-00000" + counter;
Run Code Online (Sandbox Code Playgroud)
这样customerID就可以了AGP-000001.
对于计数器值2- customerID字符串将是AGP-000002.
我的问题是,如果计数器10那么customer ID会 AGP-0000010,我希望它是AGP-000010.
我怎样才能确保customer ID总是如此AGP-000010?
c# ×1