>Hi VFPers,
>
>Thought I will create a new message. And seeing it was discussed in another thread, I thought it might be a good idea to do something similar using some of the features of .NET
>
>Lets look at the basics of reversing a string: "12345" -> "54321", the recursive way. Yes you heard correctly Recursive
>
>
>FUNCTION Reverse(cStr AS STRING) AS STRING
> RETURN iif(cStr.Length < 2, cStr, Reverse(cStr.Substring(1)) + cStr.Left(1))
>
> RETURN iif(Len(cStr) < 2, cStr, Reverse(SubStr(cStr, 2)) + Left(cStr, 1))
>ENDFUNC
>
>
>Voila 1 line of code to reverse a string
Hey, is it that everything's an object, so you can just say 1234.56.toString() ? ISTR it is so in JavaScript, that even literals are actually objects (of type number, date, string etc).
Note that I had to relearn javascript every 2-3-4 years (used it so often :), and that I managed to push my way to retirement without ever learning .net; I can read C# and it's very amusing, in the amount of dance one has to write to satisfy the compiler. Spoiled by interpretive language, aren't we?