visual-studio

Visual Studio Code Metrics and the Maintainability index of switch case

Hi there! As a person who loves to follow the best practices, If i run code metrics (right click on project name in solution explorer and select "Calculate Code Metrics" - Visual Studio 2010) on: public static string GetFormFactor(int number) { string formFactor = string.Empty; switch (number) { ...

Refreshing Visual Studio's COM references tab

I right-clicked on the bin folder of my web app to add a COM Reference. I did not find the desired Com reference in the list. I went back to the Command Line to register by desired Com dll using resvr32. However, the COM references tab does not shows it (looks like the information is cached somewhere). Even restarting VS did not help. ...

How are open source projects in C/C++ carried out exactly without .sln/.project files?

Seems most open source projects in C/C++ only provide the source code,i.e. nginx Is this a convention that anyone interested in joining the developing team should figure out the .sln/.project files himself to qualify?? ...

precompile App_LocalResources in Visual Studio

My web-application project (not "web-site" project) is translated to 15 different languages using the ASP.NET's built-in resource engine - which means I have tons of *.aspx.resx files in the "App_LocalResources" folder. All these resources are precompiled by ASP.NET when I first launch the application and it takes a lot of time. I mean ...

C# 2008 Express v C# 2010 Express

Can anybody post a link to a comparison chart, or even to a duplicated question here on SO, for these two products? Plenty of info on what is missing between Express and Pro for example, but I'm struggling to find much on Express v Express. Is the only real difference the ability to develop apps for .NET 4.0? I'm developing WinForms a...

switching between one and two displays in visual studio

Most of the time I work Visual Studio with two monitors. I setup my Visual Studio to sit nicely across both monitors with code on the one side and property windows etc. on the other. However, occasionally I need to remove into my work station from home where I only have one monitor. What ends up happening is I have to re-setup my entire...

How slow am I?____________

Is there a way to check in VS 2010 how much time did I spend on particular project? It's just I feel that I'm not working fast enough and seeing the actual time I spent would probably kick me in my ass and maybe I would speed up a bit. Thanks. ...

How can i call method from class but this method implemented from any interface?

i try to call base.Alan(); in HacimBul. But base. dont give intellisense alan method public double HacimBul() { throw new Exception(); //return base..... --> how can i see base.Alan(); } namespace interfaceClass { class Program { static void Main(string[] args) { ...

Better C# Syntax Coloring for Visual Studio 2010?

Coming from Eclipse, I'm disappointed with the very limited syntax coloring capabilities offered for C# by Visual Studio (all versions, up to 2010). In particular, I'm interesting in distinct coloring for methods / fields / locals / static stuff. I'm aware Visual Assist can enhance the coloring, but I've failed to find any free alterna...

What font should I use in Visual Studio 2010 when giving a presentation?

Scott Hanselman suggests using Lucida Console, 14 to 18pt, Bold for the Visual Studio font when presenting. But that's a post from 2003, and I think I remember hearing that there was a better font in VS 2010. Is it Consolas? What font/size should I use when giving a presentation? ...

Intercept generation of event handlers in Visual Studio

I'm making a small Visual Studio addin that changes the default generated event handler names in VS from something like txtName_Click to something user defined. I've already done this for the WinForms and WebForms designer using IEventBindingService, but I want to do this in the C# code editor as well. When you type something like "txtNa...

Dynamic expansion of a Crystal report...

I have a crystal report consisting of several pages. Each page consists of a several fields that are populated from database. Suppose the following example : Name : aaaaaa Education Background:bbbbbbb Age:cc In my case the Education Background's details (bbbbbbb here) may consist of several words or several pages. If I set a large sp...

How to re-use ASP.NET .aspx or .ascx files?

Hi all, I know if someone wnats to re-use some classes (not UI), he must gather all of them and put in a Visual Studio Class Library, build it to some dells and distribute thoese dlls. In this approach there just one code, you just update code in one place. But what about ASP.NET's markups? For exmaple you have an .ascx file or a colle...

What is the difference Between String and string?

Possible Duplicate: String vs string in C# What is the difference Between String and string or Double and double? if i use : double s1; or if i use Double s1; can you give pros and cons? ...

Should I auto-increment the assembly version when I build my software?

In Visual Studio 2003, you could easily set your project assembly to auto-increment every time you built it, but with Visual Studio 2005, this functionality was removed. You can still auto-increment your assembly version on every build, but it's a complicated custom build step instead of an integrated feature. I'm not sure why this was ...

How Do I Handle errors in Windows Applications

I did a program and in some point - when the program needs to exit he throw an exception here is the code try { Application.Run(new Form1()); } catch (ExitException) { } In the VS it's working fine (VS 2008 - C#) But when I run it separately from the VS - the program say so the error is not handled I know so I can do like this A...

tokens in visual studio: HACK, TODO... any other?

what tokens do you find useful in visual studio? (visual studio 2010 → environment → task list → tokens) currently i have only: HACK - low REVIEW - high TODO - normal WTF - high (only these - deleted some default ones) are you using any others? are you covering any other important thing with comment tokens? any best practices? th...

why assign null value or another default value firstly?

i try to generate some codes. i face to face delegates. Everythings is ok.(Look below) But appearing a warning: you shold assing value why? but second code below is ok. namespace Delegates { class Program { static void Main(string[] args) { HesapMak hesapla = new HesapMak(); hesapla.Calculator = ...

JavaScript/JSON Serializer

I see that a JSON serializer is present in the System.Web.Script.Serialization namespace, and is shipped in the System.Web.Extensions.dll assembly. Is this assembly distributed with the .NET framework v4.0 redistributable? Is it also guaranteed to be present on a user's machine if any edition of Visual Studio 2010 is installed? Adde...

implementing Ws-security within WCF proxy

Hi, I have imported an axis based wsdl into a VS 2008 project as a service reference. I need to be able to pass security details such as username/password and nonce values to call the axis based service. I have looked into doing it for wse, which i understand the world hates (no issues there) I have very little experience of WCF, but...