read more than one extension

Hello, I have a program that encrypts and reads .txt and replaces it with PGP, however I want it to be able to read in more than one extension and change it to PGP, any can help if that?
and this is the exit
string strFileCripto = strFilePath.Replace(“out”, “pgp”);


If you want to use Gpg in you implementation to encrypt/decrypt something you should use GPGME for that.
How to replace strings, on the other hand, is not topic of this forum. Please visit the appropriate communities for the programming language you are using.