Vb.Net 将 StrDup 转换为 C#.net [英] Vb.Net convert StrDup to C#.net
本文介绍了Vb.Net 将 StrDup 转换为 C#.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有这行代码:
strKey &= Strings.StrDup(intKeySize - intLength, chrKeyFill)
这段代码在 C# 中的等价物是什么?我好像找不到.
What is the equivalent of this code in C#? I can't seem to find it.
推荐答案
strKey += new String(chrKeyFill, intKeySize - intLength);
或
strKey = strKey.PadRight(intKeySize, chrKeyFill)
这篇关于Vb.Net 将 StrDup 转换为 C#.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文