我想将转换为小数的大字符串存储在 SortedDictionary 中(作为键),但它们必须符合某种格式......由于排序字符串的性质,它们不会像小数一样正确放置。这里有些例子:
Public dic_Extracted As New Dictionary(Of Decimal, clsBillExtract)
'Display the keys and their index in the dictionary (as string and as decimal)
"000000000000000000000000000" 'String Index = 0, Decimal Index = 0
"001000000000000000000000000" 'String Index = 1, Decimal Index = 1
"002000000000000000000000000" 'String Index = 3, Decimal Index = 2
"010000000000000000000000000" 'String Index = 2, Decimal Index = 3
当键作为小数放在字典中时,前面的零将被修剪......就像这样:
字符串:“001000000000000000000000000”将是密钥 1000000000000000000000000...
有没有办法保留前面的零?