[Logo]
Forums Register Login
Turning an int into a String
So I've inherited a codebase. And pretty much everywhere that an object returns an int, where a String is desired, I find code like this:



Is there some sort of advantage to that code, that I don't understand? I mean: why not just this:

It's possible that the advantage was simply that the original programmer knew how to write that code but didn't know how to write your suggested replacement.
Seriously? That's what you're going with? I prefer this tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database


This thread has been viewed 1176 times.

All times above are in ranch (not your local) time.
The current ranch time is
Jan 19, 2019 21:42:01.