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

C# Convert List to Dictionary

Try this: The first lambda lets you pick the key, the second one picks the value. You can play with it and make values differ from the keys, like this: If your list contains duplicates, add Distinct() like this: EDIT To comment on the valid reason, I think the only reason that could be valid … Read more

Create html documentation for C# code

Doxygen or Sandcastle help file builder are the primary tools that will extract XML documentation into HTML (and other forms) of external documentation. Note that you can combine these documentation exporters with documentation generators – as you’ve discovered, Resharper has some rudimentary helpers, but there are also much more advanced tools to do this specific … 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.