有一个烦人的问题,虽然我已经构建了一个类并在下面的客户端程序中引用了它 - 使用时,编译器想要我的方法的完全限定名称。
// this doesn't compile because it does not recognize the Decrypt method
using PGPEncryptDecrypt.Helpers.PGP;
namespace TestComInterOpPGP
{
class Program
{
static void Main(string[] args)
{
PGPEncryptDecrypt.Decrypt(@"C:\Users\blah.pgp",
@"C:\Users\secring.gpg",
"pwd",
@"C:\Users\out.txt");
}
}
}
必须完全符合条件
// this does compile
using PGPEncryptDecrypt.Helpers.PGP;
namespace TestComInterOpPGP
{
class Program
{
static void Main(string[] args)
{
PGPEncryptDecrypt.Helpers.PGP.PGPEncryptDecrypt.Decrypt(@"C:\Users\blah.pgp",
@"C:\Users\secring.gpg",
"pwd",
@"C:\Users\out.txt");
}
}
}