简体   繁体   中英

Why is C# IntelliSense delayed compared to VB.NET?

In VB.NET projects, errors are highlighted immediately after cursor leaves the line. In C#, I have to wait several seconds for IntelliSense to highlight it. Also, the C# version doesn't show all project errors in "Errors List", unless you start to build it. Actually, it seems to work differently in every way. Is it possible to adjust that behavior?

I am using both Visual Studio 2008 and Visual Studio 2010.

使用Visual Basic时,Visual Studio会立即编译新代码,而使用C#时,只会直接突出显示语法错误,并在构建代码后编译错误。

It's because VB.NET does full background compilation whenever the IDE is idle, so it always has the latest information ready. C# doesn't do this and instead have a separate process that creates the IntelliSense information.

You can't really adjust it without a lot of work or buying some third party tool. It's one of the differences between the languages, the VB.NET team concentrates on certain aspects and the C# team on others.

Though I think some of the addins you can buy (possibly ReSharper and others) are advertising better IntelliSense if you really want it.

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