MSDN Blogs

Dealing with Read-Only Files

Wed, 06/20/2018 - 11:00
Here's how to avoid the frustration of discovering that you've made changes to a file you can't change in Visual Studio.
Categories: Microsoft

Disposing of the DbContext Object

Mon, 06/18/2018 - 17:14
While the DbContext object has a Dispose method, you don't really need to use it ... with one exception.
Categories: Microsoft

URL Rewriting vs. HTTP Redirects

Mon, 06/18/2018 - 17:13
ASP.NET code gives you enhanced ability to rewrite URLs to redirect client requests. But that leads to a key question: When should you use this new ability?
Categories: Microsoft

Converting DataTables to JSON

Tue, 05/29/2018 - 08:00
Sometimes your applications have to combine older technology with newer practices. Here's one example of how to keep your code up to date without replacing it.
Categories: Microsoft

What the Colors for Changed Lines in Visual Studio Mean

Tue, 05/22/2018 - 15:17
Here's a guide to the colorful lines down the right-hand margin of your editor window (and how to get them).
Categories: Microsoft

Sealing Methods and Properties

Thu, 04/26/2018 - 07:03
Developers creating base classes can decide what should and should not be inherited. So can developers creating derived classes.
Categories: Microsoft

Don't use Enumerables as Numbers

Mon, 04/23/2018 - 08:32
Stop. Just stop.
Categories: Microsoft

HTTP Protocol: Headers vs. Body

Mon, 04/16/2018 - 11:02
As part of putting together a request to a Web Service, whatever tool you’re using will format an HTTP request. That request has two main parts: The headers (which includes the URL and the HTTP verb) and the body (your JSON payload), with the body being optional.
Categories: Microsoft

Object Browser: The World's Worst-Named Tool

Thu, 04/05/2018 - 07:18
Object Browser doesn't work with objects and doesn't just browse. In fact, it can simplify adding references to your projects when you don't know what class library you want.
Categories: Microsoft

Inheriting from Generics: Set the Datatype ... Or Not

Mon, 04/02/2018 - 07:43
Generics not only let you create more flexible classes, they make inheritance more flexible, also. To pick the right inheritance mode when inheriting from a generic, though, you must know what you're trying to accomplish with your derived class.
Categories: Microsoft

Collecting Collections: The Lookup Collection

Mon, 03/19/2018 - 07:50
Sometimes you need a "collection of collections." Don't write ugly code to do that -- the Lookup object will create that collection for you in a heartbeat.
Categories: Microsoft

Finding What's Changed in Your Code

Thu, 03/15/2018 - 14:19
If your source control system won't tell you what's changed, Visual Studio is glad to help. It's just that the option is hard to get to.
Categories: Microsoft

Converting Your ASP.NET Web Forms Application to ASP.NET MVC

Mon, 03/12/2018 - 10:44
There are a lot of Web Forms applications out there ... but the future belongs to MVC. Here's Peter's advice on what to do about that.
Categories: Microsoft

Brush Up Your SQL

Mon, 03/05/2018 - 09:18
LINQ and Entity Framework are great ... but you're still going to need to write SQL.
Categories: Microsoft