我有这行代码:
strKey &= Strings.StrDup(intKeySize - intLength, chrKeyFill)
这段代码在 C# 中的等价物是什么?我好像找不到。
最佳答案
strKey += new String(chrKeyFill, intKeySize - intLength);
或
strKey = strKey.PadRight(intKeySize, chrKeyFill)
关于c# - Vb.Net 将 StrDup 转换为 C#.net,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5902246/