convert a string to 64 bit integer in vb.net
given a string (it may contain numbers or alphabets) i want it to be converted to a 64 bit integer value. i saw a vc++ program in which some shift and or operation is applied and the string converted to a 64 bit value.is there any such method in vb.net ?.after gettting the 64 bit value, i have to apply some permutations to it.can somebody help me
Re: convert a string to 64 bit integer in vb.net
Quote:
Originally Posted by reshmip
given a string (it may contain numbers or alphabets) i want it to be converted to a 64 bit integer value. i saw a vc++ program in which some shift and or operation is applied and the string converted to a 64 bit value.is there any such method in vb.net ?.after gettting the 64 bit value, i have to apply some permutations to it.can somebody help me
You cud use Convert.ToInt64 method to do the conversion..
Re: convert a string to 64 bit integer in vb.net
convert.ToInt64 can be used only if the string contains numbers.it will not accept alphabets.
Re: convert a string to 64 bit integer in vb.net
this is even easier
CInt(Object as expression)
this is how i always do it.
- Josh
Re: convert a string to 64 bit integer in vb.net
Quote:
Originally Posted by reshmip
convert.ToInt64 can be used only if the string contains numbers.it will not accept alphabets.
Can you give a sample of this string? Is it in HEX format? If not how do you convert alphabet into number?
Re: convert a string to 64 bit integer in vb.net
Like I say, just use CInt(string)