Tom, if you want to convert a string of ASCII chars into a number and do the
inverse process, then the informational content of both is the same, only
the representation changes. Are you hoping that the manipulation of one
representation is more convenient to manipulate than the other in some way?

 

David's summing code is a poor hash algorithm. At first I thought you wanted
some sort of hash of the string in which case GetHashCode() or a
HashAlgorithm would be great, but you can't reverse them.

 

I notice that Framework 4 introduces BigInteger
<http://msdn.microsoft.com/en-us/library/system.numerics.biginteger.aspx> .
You could turn the string into one of those I suppose and do all sorts of
fun things with it like factoring them. Check if your name as a BigInteger
is a prime?!

 

Cheers,

Greg

Reply via email to