Top ".net" questions

Do NOT use for questions about .NET Core - use [.net-core] instead.

Copy the entire contents of a directory in C#

I want to copy the entire contents of a directory from one location to another in C#. There doesn't appear …

c# .net directory copy
Connection string using Windows Authentication

I am creating a website, but in the database I use windows authentication. I know that you use this for …

.net asp.net-mvc connection-string windows-authentication
How do I exit a WPF application programmatically?

In the few years I've been using C# (Windows Forms), I've never used WPF. But, now I love WPF, but …

c# .net wpf shutdown
How to get the current user in ASP.NET MVC

In a forms model, I used to get the current logged-in user by: Page.CurrentUser How do I get the …

c# .net asp.net-mvc iis forms-authentication
WebAPI Multiple Put/Post parameters

I am trying to post multiple parameters on a WebAPI controller. One param is from the URL, and the other …

.net asp.net-web-api
Error - Unable to access the IIS metabase

After installing Visual Studio 2012 and opening my solution I get a series of errors in this form: The Web Application …

c# .net iis iis-metabase
Get url parameters from a string in .NET

I've got a string in .NET which is actually a url. I want an easy way to get the value …

c# .net url parsing parameters
Get Month name from month number

Possible Duplicate: How to get the MonthName in c#? I used the following c# syntax to get month name from …

c# .net datetime
How to declare a local variable in Razor?

I am developing a web application in asp.net mvc 3. I am very new to it. In a view using …

c# .net asp.net-mvc asp.net-mvc-3 razor
How do I skip an iteration of a `foreach` loop?

In Perl I can skip a foreach (or any loop) iteration with a next; command. Is there a way to …

c# .net loops