如何断开具有 SecureInt64 值的逗号分隔字符串?
How to break a comma separated string which has SecureInt64 values?
我需要断开包含逗号分隔值的字符串
string ids = "P_0vyx5RVcWblbdw6pql5w~~, BAW1G8b3FuRhR0REQ1JtDw~~"
这些值实际上是 SecureInt64。
我需要打破一个集合,我正在尝试如下
var t = ids.Split(',').ToList().OfType<SecureInt64>();
但这并没有破坏集合。
当我用断点指向 t
时,它说
'Enumeration yielded no results'
我还需要在 Unselcure ID 中翻译,像这样,
t.Select(k => k.UnsecureValue).ToList()
您需要一种将字符串转换为 SecureInt64 的方法。
var t = ids.Split(',')
.Select(ToSecureInt64)
.Select(k => k.UnsecureValue)
.ToList();
private SecureInt64 ToSecureInt64(string value)
{
// logic needed to translate a string to SecureInt64.
}
我需要断开包含逗号分隔值的字符串
string ids = "P_0vyx5RVcWblbdw6pql5w~~, BAW1G8b3FuRhR0REQ1JtDw~~"
这些值实际上是 SecureInt64。 我需要打破一个集合,我正在尝试如下
var t = ids.Split(',').ToList().OfType<SecureInt64>();
但这并没有破坏集合。
当我用断点指向 t
时,它说
'Enumeration yielded no results'
我还需要在 Unselcure ID 中翻译,像这样,
t.Select(k => k.UnsecureValue).ToList()
您需要一种将字符串转换为 SecureInt64 的方法。
var t = ids.Split(',')
.Select(ToSecureInt64)
.Select(k => k.UnsecureValue)
.ToList();
private SecureInt64 ToSecureInt64(string value)
{
// logic needed to translate a string to SecureInt64.
}