我需要在vb.net中合并字符串的帮助。可以将两个安全字符串连接在一起吗?
我有part1.securestring和part2.securesting,我希望我的输出是mainPassword = part1 +part2。
但它不起作用。你有什么办法解决这个问题吗?谢谢你的帮助。
发布于 2018-06-19 15:43:16
结案。我找到了解决方案:
Dim stringPart1 As String
Dim stringPart2 As String
Dim stringPart3 As String
stringPart1 = New System.Net.NetworkCredential(String.Empty,part1).Password
stringPart2 = New System.Net.NetworkCredential(String.Empty,part2).Password
stringPart3 = New System.Net.NetworkCredential(String.Empty,part3).Password
hasloGlowne = New Security.SecureString()
For Each c As Char In stringpart1
hasloGlowne.AppendChar(c)
Next
For Each c As Char In stringpart2
hasloGlowne.AppendChar(c)
Next
For Each c As Char In stringpart3
hasloGlowne.AppendChar(c)
Next https://stackoverflow.com/questions/50922583
复制相似问题