intellisense

Visual Studio 2010 insists on inserting spaces in JavaScript

廉价感情. 提交于 2019-12-04 02:59:44
Visual Studio 2010 inserts a space between the keyword "function" and the following parenthesis. Is it possible to turn this off? i.e. Visual Studio formats my code like: var vsfn = function () { }; I would like this formatting: var myfn = function() {}; VS2010 sp1 introduced a new option: Insert space after function keyword for anonymous functions in Tools > Options > Text Editor > JScript > Formatting > Spacing . You can turn it off to get the desired behavior. You should find these settings here: Tools > Options > Text Editor > JScript > Formatting > Spacing 来源: https://stackoverflow.com

C#: Adding extension methods to a base class so that they appear in derived classes

[亡魂溺海] 提交于 2019-12-04 02:46:17
I currently have an extension method on System.Windows.Forms.Control like this: public static void ExampleMethod(this Control ctrl){ /* ... */ } However, this method doesn't appear on classes derived from Control, such as PictureBox. Can I make an extension method that appears not only in Control, but for classes derived from Control, without having to do an explicit cast? You must include the using statement for the namespace in which your extensions class is defined or the extension methods will not be in scope. Extension methods work fine on derived types (e.g. the extension methods defined

How to write a method like string.Format with intellisense support

杀马特。学长 韩版系。学妹 提交于 2019-12-04 01:24:37
问题 Consider a method to write with a format parameter like string.Format 's frist parameter. As you know the Intellisense is aware of first parameter's constraints and checks for its consistency with parameters. How can I write such method. As a simple example, consider a wrap of string.Format like: public string MyStringFomratter(string formatStr, params object[] arguments) { // Do some checking and apply some logic return string.Format(formatStr, arguments); } How can I say to the compiler or

Visual Studio 2015 RC intellisense does not display parameter list

自古美人都是妖i 提交于 2019-12-04 01:16:16
I have been using Visual Studio 2015 since CTP 6 and I have noticed that the IDE does not show the parameter list when I type the opening parenthesis "(". This is what I am expecting to see: In the screenshot above you see the the Create method has two overloads and this displays when I type the open parenthesis. But in Visual Studio CTP 6 and RC, nothing happens. I cannot see the overloads or the parameter list. Is this a bug? Is there anyway to fix this issue? Here's the answer: Go to Tools, Options, Text Editor, All Languages, General. Then check the following options (override 'mixed'

Enabling javascript intellisense for external libraries in Visual Studio

痞子三分冷 提交于 2019-12-04 00:18:40
I updated ~/Scripts/_references.js with /// <autosync enabled="true" /> /// <reference path="angular.js" /> /// <reference path="angular-route.js" /> and in my app.js I can see some intellisense working, which is great but go a little further and it doesn't work anymore. Any ideas on why this happens or ways to make it work? Because you are using dependency injection , Visual Studio has no way to figure out what are the types of the arguments. This is a common problem with Javascript intellisense and, since Javascript does not allow for explicit type annotations, it seems that there is no

emacs intellisense

不想你离开。 提交于 2019-12-03 23:01:54
I know this has been discussed a lot of times but is there any nice how-to for c/c++ intellisense in emacs? I have never been able to set up cedet properly. Right now I am working on a maintenance project with a huuge code base and it is very difficult to manage without proper intellisense. Currently I am using vim with ctags/cscope and omnicomplete features for intellisense which works great; but I would like to get things to work with emacs. If you cannot get CEDET working, then you could use auto-complete.el combined with CTAGS or just words-in-buffer or words-in-all-buffers. For what it's

How to add NHibernate XML schema to Visual Studio?

我怕爱的太早我们不能终老 提交于 2019-12-03 23:01:14
I'm learning NHibernate and I added <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> to App.config . Visual Studio reported a message: Could not find schema information for the element 'urn:nhibernate-configuration-2.2:hibernate-configuration'. I know this is not a problem, but if VS knew the schema, IntelliSense would work. How can I add the schema? Just include the XSD files in any of your projects or as Solution Items. Copy the two .xsd from the folder Required_Bins from the NHibernate download to C:\Program Files\Microsoft Visual Studio 10.0\Xml\Schemas. If you use other

Embedding Intellisense Xml Documentation in Assembly?

核能气质少年 提交于 2019-12-03 22:13:50
I have an assembly containing very thorough XML-based documentation, which is used through Sandcastle to generate the help-files for the product. We also use the output XML files for providing proper Intellisense in Visual Studio when programmers use the assembly obviously. In order to do this, it seems we have do both supply the user with the assembly ("assembly.dll") and the documentation ("assembly.xml"). Is it somehow possible to embed the documentation within the assembly, so we'd only have to supply the single assembly-file and Visual Studio would be able to extract the information?

WPF: how to display enum property values in VS2008 XAML editor intellisense?

老子叫甜甜 提交于 2019-12-03 21:35:57
问题 I created a WPF custom control with a dependency property of an enum type. I want the user of that control when editing the XAML in VS to see the optional values of the enum in the intellisense window. Does anyone know how it can be done? 回答1: I believe it will work if you add an "XmlnsDefinition" attribute to the assembly containing the control. By the way, I ran into problems with this when trying to reference the control in the same project. 回答2: The question was asked also here: How can I

Is there any way to disable intellisense for a specific project / namespace / whatever?

北城以北 提交于 2019-12-03 20:57:44
问题 Is there any way to do this at any level other than disabling intellisense in all of Visual Studio? Just wanted to confirm/deny a suspicion about its performance in some of our overly giant projects/solutions while keeping it in other areas that we actually care about. 回答1: AFAIK there's no way to selectively disable Intellisense. Try disabling it completely and see if that would make a big difference. 回答2: I have noticed a slow down in Visual Studio on my work machine with several VS