简体   繁体   中英

IntelliSense based on “using” not inheritance

In the screenshot below compiler and IntelliSense show that unless I uncomment the using statement the program instance is not a valid argument to SatisfyImportsOnce . It's not matching signature based on base class/interface/implicit convert as far as I can tell and both have relevant references, so how does it know? What is this using check called and how is does it work?

http://i.imgur.com/3BPpXew.png

在此处输入图片说明

Without the using , the compiler finds only this method , in the System.ComponentModel.Composition.Hosting namespace, which only takes a ComposablePart parameter

With the using, it also finds this extension method which takes an object parameter.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM