2014-01-17 5 views
1

난 클래스를 빌드하고 아래의 클라이언트 프로그램에서이를 참조했으나 컴파일러는 내 메소드의 정규화 된 이름을 원한다. C# Net 클래스 참조 클래스 라이브러리 : 공용 클래스를 완전히 정규화해야하는 이유는 무엇입니까?

// 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"); 

    } 
} 
} 

답변

2

아를 한정해야합니다 - 나는 문제가 클래스 PGPEncryptDecrypt 네임 스페이스의 첫 번째 부분과 같은 이름을 가지고 있다는 것을 깨달았다이 입력하는 동안. 그래서 나는 하나 또는 다른 것을 바꾸 었으며 완전히 자격을 얻을 필요가 없습니다. 아마도 이것은 누군가를 도울 것입니다!