开发者

Why is there no code completion when using "extern alias" in VS2008?

开发者 https://www.devze.com 2022-12-17 08:48 出处:网络
Here is code snippet: extern alias customerRead; extern alias customerEdit; extern alias customerSearch;

Here is code snippet:

extern alias customerRead;  
extern alias customerEdit;  
extern alias customerSearch;

using readC = customerRead::X.Y.DataAccess;  
using editC = customerEdit::X.Y.DataAccess;  
using searchC开发者_如何学编程 = customerSearch::X.Y.DataAccess;  
...  

readC.Customer c = new readC.Customer();  
c. // NO CODE COMPLETITION

I have aliases for all three projects in .project file and compiling from the IDE goes well.


The assembly containing the aliased namespace is specified on the compiler command line as opposed to in a source document. I assume the issues here are:

  • The binding of assemblies to the alias is indirect
  • The IntelliSense name resolver doesn't check for names in aliased namespaces
  • So few people use this feature that it's low priority on the "TODO" list
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号