It depends entirely on the licence terms under which the original author distributes it.
Some licences allow you to do anything you like, some refuse use for commercial projects, some are fine but require you to "open source" your whole app if you include their code.
Start with the place you got the code from, and look for license info with the release (if it was from an article here, there is a "License" section near the bottom. For example, this tip:
Using IP based Geolocation - and why it's pretty much useless.[
^] has a section saying that:
Quote:
License
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)
And provides a link to the licence terms.
Read the licence and it should tell you - if you do not understand, then
contact the author and ask. He is the person who can give you permission regardless of the licence terms, so it makes sense. Ignoring licence terms can result in you having to pay the author for each copy you sell, and / or withdrawing your app from sale. Plus having to pay legal fees...
But we can't tell you what the code you found will permit you to do!