Is the "when" keyword in a try catch block the same as an if statement?

In C# 6.0 the "when" keyword was introduced, now you're able to filter an exception in a catch block. But isn't this the same as a if statement inside a catch block? if so, isn't it just syntactic sug...

23 Sep at 01:1

Proper way to dispose a new Form

So in my apps, I tend to create new instances of forms on the fly, then use `Form.Show()` to display them (non modal). ``` private void test_click(object sender, EventArgs e) { var form = new myF...

7 Dec at 19:40

ServiceStack MQ (version > 4.0.54) GlobalMessageResponseFilters are not invoked

Problem: GlobalMessageResponseFilters are not invoked for MQ server. ServiceStack version > v4.0.54. According to [documentation](https://github.com/ServiceStack/ServiceStack/wiki/Request-and-res...

14 Sep at 21:33

Dynamically changing schema in Entity Framework Core

[here](https://stackoverflow.com/a/50529432/3272018) is the way I solved the problem. Although it's likely to be not the best one, it worked for me. --- I have an issue with working with EF Core...

How can I read headers sent from my API with angular?

I have something similar to the following code on `domain.com`: ``` $http.post("http://api.domain.com/Controller/Method", JSON.stringify(data), { headers: { 'Content-Type'...

14 Sep at 19:55

gpg failed to sign the data fatal: failed to write commit object [Git 2.10.0]

I followed few articles over the [pretty](https://coderwall.com/p/euwpig/a-better-git-log) attributes on [Git 2.10](https://github.com/blog/2242-git-2-10-has-been-released) release note. Going through...

23 May at 12:10

How do you format code on save in VS Code

I would like to automatically format TypeScript code using the build-in formatter when I save a file in Visual Studio Code. I'm aware of the following options, but none of them is good enough: - `...

9 Apr at 11:26

Provide static IP to docker containers via docker-compose

I'm trying to provide static IP address to containers. I understand that I have to create a custom network. I create it and the bridge interface is up on the host machine (Ubuntu 16.x). The containers...

21 Aug at 08:32

How to send pre serialized json through hub API method

For performance reasons , i want to use servicestack JSON serializer instead of default JSON.Net. It seems there is no way to replace serializer in signalR2 and is not even recommended as the link say...

23 May at 12:6

Python/Json:Expecting property name enclosed in double quotes

I've been trying to figure out a good way to load JSON objects in Python. I send this json data: ``` {'http://example.org/about': {'http://purl.org/dc/terms/title': [{'type': 'literal', 'value': "Ann...

14 Sep at 13:17

Porting a Prism-based WPF application to .NET Core

We have a Prism-based WPF application with over 10 man years of development invested in it. We are moving big chunks of it into web browser control hosted modules to make it platform independent in t...

28 Jun at 11:0

What does new[] {a,b} mean and create?

I found this code and can guess what it does, but cannot find an explanation why the type definition `byte[]` can be omitted. I looked at msdn c# [new][1] explanation, but that is too simple there. ...

7 May at 06:2

How do I mock a REST template exchange?

I have a service in which I need to ask an outside server via rest for some information: ``` public class SomeService { public List<ObjectA> getListofObjectsA() { List<ObjectA> objectALi...

17 Dec at 05:5

Rotate - Transposing a List<List<string>> using LINQ C#

I'm having a `List<List<string>>`, which is return from the remote data source (i.e., WCF). So, I need to modify the following data into a user-friendly list using LINQ The C# Code is ``` List<List<...

14 Sep at 08:44

GraphQL readiness for .net development

I found GraphQL as an enticing option to decouple front-end development from APIs (potentially a great fit for our company, which does lots of API customization for each customer). However, I can't qu...

14 Sep at 02:38

Updating to latest version of CocoaPods?

I'm having some issues installing `Alamofire 4.0` into my project. I've got the latest version of , running , and when I try to install alamofire I'm getting like 800 compiler errors. Apparently > Coc...

6 Apr at 21:9

Refreshing Sql Connection Azure AD access token inside long-lived Entity Framework Context

I'm trying to set up a few .NET applications to use certificate-based authentication to Azure Active Directory and then use Active Directory to authorize my access to a Sql Azure DB. The problem I'm ...

How to create development branch from master on GitHub

I created a repo on GitHub and only have a `master` branch so far. My local working copy is completely up to date with the remote/origin `master` on GitHub. I now want to create a `development` branc...

13 Sep at 20:28

ServiceStack.Redis Client Unknown reply on integer response: 430k

I'm getting random exceptions using the ServiceStack.Redis client on an Azure Application Service. Any thoughts? ServiceStack.Redis 4.5.0 and ServiceStack 4.0.60.0 "ExceptionMessage": "Unknown repl...

13 Sep at 19:31

Will List<T> Shrink In Size If You Remove Elements

When a `List<T>` gets full, it doubles in size, occupying twice the memory, but would it automatically decrease in size if you removed elements from it? As much as I understand decreasing the `Capaci...

13 Sep at 18:6

T4 Template is Generating Extra New Lines on Some PCs

While using T4 classes for entity framework there are a couple of developers who generate classes with one extra new line for every line generated. I'm wondering if this is some kind of setting that n...

6 Jan at 14:27

How to change the cursor on hover in C#

I can't find out on how I can change my cursor to a "pointer" or whatever it's called while hovering an image. I have tried with MouseOver but I can't get it to work. Here's my current code; ``` pri...

13 Sep at 15:14

How do I print colored output with Python 3?

I have a simple print statement: ``` print('hello friends') ``` I would like the output to be blue in the terminal. How can I accomplish this with Python3?

13 Sep at 17:21

EPPlus Changing Border Color of cells

I'm trying to change the cell border color on a selected range. Couldn't find any other styles for cell borders other than for the weights of the borders as follows: ``` range.Style.Border.Top.Style ...

13 Sep at 13:39

C# Regex Performance very slow

I am very new in regex topic. I want to parse log files with following regex: ``` (?<time>(.*?))[|](?<placeholder4>(.*?))[|](?<source>(.*?))[|](?<level>[1-3])[|](?<message>(.*?))[|][|][|](?<placehold...

1 Nov at 07:4