Powershell哈希表:找不到“添加”和参数计数:“ 2”的重载

时间:2019-02-22 09:56:13

标签: powershell hashtable

我不知道为什么这段代码会引发异常:

//Base64 encoding
let data = combinedString.data(using: .utf8)//Here combinedString is your string
let encodingString = data?.base64EncodedString()
print(encodingString!)

// OR Single line of code
let encodingString = combinedString.data(using: .utf8)?.base64EncodedString()//Here combinedString is your string
print(encodingString!)

我真的很傻,我做错了什么?

0 个答案:

没有答案