Vb.Net convert StrDub to C#.net

2019-02-25 19:37发布

I have this line of code:

strKey &= Strings.StrDup(intKeySize - intLength, chrKeyFill)

What is the equivalent of this code in C#? I can't seem to find it.

标签: c# vb.net strdup
2条回答
forever°为你锁心
2楼-- · 2019-02-25 20:09
strKey += strKey.PadRight(strKey.Length + (intKeySize - intLength), chrKeyFill)
查看更多
Anthone
3楼-- · 2019-02-25 20:14
strKey += new String(chrKeyFill, intKeySize - intLength);

or

strKey = strKey.PadRight(intKeySize, chrKeyFill)
查看更多
登录 后发表回答