Strip double quotes from a string in .NET

I think your first line would actually work but I think you need four quotation marks for a string containing a single one (in VB at least): for C# you’d have to escape the quotation mark using a backslash:

How to properly make a http web GET request

Servers sometimes compress their responses to save on bandwidth, when this happens, you need to decompress the response before attempting to read it. Fortunately, the .NET framework can do this automatically, however, we have to turn the setting on. Here’s an example of how you could achieve that. GET GET async POSTContains the parameter method … Read more

How to make inline functions in C#

Yes, C# supports that. There are several syntaxes available. Anonymous methods were added in C# 2.0: Func<int, int, int> add = delegate(int x, int y) { return x + y; }; Action<int> print = delegate(int x) { Console.WriteLine(x); } Action<int> helloWorld = delegate // parameters can be elided if ignored { Console.WriteLine(“Hello world!”); } Lambdas … Read more

How to resolve file being used by another process?

There are a bunch of questions on SO related to this, all with suggestions and recommendations for solving the issue. For me, none worked until I found this one. In short, if it’s the System Process locking the file, and you have the Application Experience service stopped, restart it. Seriously.

Entity Framework vs LINQ to SQL

LINQ to SQL only supports 1 to 1 mapping of database tables, views, sprocs and functions available in Microsoft SQL Server. It’s a great API to use for quick data access construction to relatively well designed SQL Server databases. LINQ2SQL was first released with C# 3.0 and .Net Framework 3.5. LINQ to Entities (ADO.Net Entity … Read more