Pros/Cons of using an existing .NET assembly versus a command-line tool for same purpose (C#)
I have searched the Internet and I can't seem to find anything related to this topic. I would think there would have been some discussion on it. I just can't find it.

Basically, what I'm looking for is good reasons to use an existing .NET assembly to do the same thing an (older) command-line executable would do. Therefore, if I used the assmebly, I'd include it and begin using it in my C# code.

To us the old command-line tool, I'd do a Process.Start() and so forth.

Background on this is:

I have a requirement to perform PGP encryption and decryption on files transferred to and from our system. My current options are to use the command-line GPG tool (http://www.gnupg.org/) or the Bouncy Castle .NET assembly.

I have been asked why I don't just "automate" the old GPG command-line tool within my code.  I'd like to answer this with some intelligence. Right now, I can only think of two reasons:

1. Error handling: I should be able to not only get better error information using the .NET assembly, but handle them better via the try/catch with exceptions, etc. I could even roll my own exceptions as needed, etc.

2. Code portability: Anything I build with the .NET assembly is more or less stand alone. I don't need to find and copy the GPG executable to each place I copy the application(s) I write using it.

3. Performance: Possibly. I don't have any experience or data regarding this.

I'd appreciate any input on this topic. Thanks.
---Dan---
Pros/Cons of using an existing .NET assembly versus a command-line tool for same purpose (C#)
===

I have searched the Internet and I can't seem to find anything related to this topic. I would think there would have been some discussion on it. I just can't find it.

Basically, what I'm looking for is good reasons to use an existing .NET assembly to do the same thing an (older) command-line executable would do. Therefore, if I used the assmebly, I'd include it and begin using it in my C# code.

To us the old command-line tool, I'd do a Process.Start() and so forth.

Background on this is:

I have a requirement to perform PGP encryption and decryption on files transferred to and from our system. My current options are to use the command-line GPG tool (http://www.gnupg.org/) or the Bouncy Castle .NET assembly.

I have been asked why I don't just "automate" the old GPG command-line tool within my code.  I'd like to answer this with some intelligence. Right now, I can only think of two reasons:

1. Error handling: I should be able to not only get better error information using the .NET assembly, but handle them better via the try/catch with exceptions, etc. I could even roll my own exceptions as needed, etc.

2. Code portability: Anything I build with the .NET assembly is more or less stand alone. I don't need to find and copy the GPG executable to each place I copy the application(s) I write using it.

3. Performance: Possibly. I don't have any experience or data regarding this.

I'd appreciate any input on this topic. Thanks.
---Dan---