No it's a c# project where the user will enter a public key.
Perhaps you are mixed up, a Bitcoin address and a public key are two different things.
A bitcoin address looks like this:
1HZwkjkeaoZfTSaJxDw6aKkxp45agDiEzN
A public key looks like this:
04a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd5b8dec5235a0f a8722476c7709c02559e3aa73aa03918ba2d492eea75abea235
If you want to validate a bitcoin address, you can check the length, check if it begins with a 1 or 3, check if it is valid base58 and check if the checksum is valid. Here is a Ruby script that does all of this which you can use as a reference:
https://gist.github.com/alexandrz/4491729
If you want to check if a public key is valid, you can also check the length and check that it is hex.
Thank you! It's the address I want to check. Actually thought that the address was the public key.