$string.Substring Index/Length exception

后端 未结 3 1572
小鲜肉
小鲜肉 2020-11-30 14:22

I\'m getting this exception when using Substring:

Exception calling \"Substring\" with \"2\" argument(s): \"Index an         


        
3条回答
  •  天命终不由人
    2020-11-30 14:52

    If the last character of the string is all you want, you can achieve this by simply treating the string as an array of chars and use the according index notation:

    'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\hid\Parameters\0'[-1]
    

提交回复
热议问题