O
OSVBNET
Guest
Hi,
Wrote a code with Option Stric Off, now I turned it On and there are some errors, need help with them:
----------------------------------------------------------------------------------------------------------
1) Dim MyCounter As Integer = FileTextBox.Text.Split("/").Length - 1 :: disallows implicit conversions from 'String' to 'Char'
----------------------------------------------------------------------------------------------------------
2) Dim MyVersion As Decimal = 1.0
Dim OriginalVersion As Decimal = 2.5
:: disallows implicit conversions from 'Double' to 'Decimal'
I want to check my app version against the current version pulled from server, so define 2 decimal valued to compare, what's the replace with Option Strict?
----------------------------------------------------------------------------------------------------------
3. in using AdjustTokenPrivileges in a code to shut down Windows:
AdjustTokenPrivileges function
My usage:
AdjustTokenPrivileges(hdlTokenHandle, False, tkp, tkpNewButIgnored.ToString.Length, tkpNewButIgnored, lBufferNeeded)
Error: disallows implicit conversions from 'Boolean' to 'Integer' : Error at 2nd parameter, False
Thanks for help.
Continue reading...
Wrote a code with Option Stric Off, now I turned it On and there are some errors, need help with them:
----------------------------------------------------------------------------------------------------------
1) Dim MyCounter As Integer = FileTextBox.Text.Split("/").Length - 1 :: disallows implicit conversions from 'String' to 'Char'
----------------------------------------------------------------------------------------------------------
2) Dim MyVersion As Decimal = 1.0
Dim OriginalVersion As Decimal = 2.5
:: disallows implicit conversions from 'Double' to 'Decimal'
I want to check my app version against the current version pulled from server, so define 2 decimal valued to compare, what's the replace with Option Strict?
----------------------------------------------------------------------------------------------------------
3. in using AdjustTokenPrivileges in a code to shut down Windows:
AdjustTokenPrivileges function
My usage:
AdjustTokenPrivileges(hdlTokenHandle, False, tkp, tkpNewButIgnored.ToString.Length, tkpNewButIgnored, lBufferNeeded)
Error: disallows implicit conversions from 'Boolean' to 'Integer' : Error at 2nd parameter, False
Thanks for help.
Continue reading...