Memory limitted to about 2.5 GB for single .net process
I am writing `.NET` applications running on Windows Server 2016 that does an http get on a bunch of pieces of a large file. This dramatically speeds up the download process since you can download the...
How to post a message via Slack-App from c#, as a user not App, with attachment, in a specific channel
I can not for the life of me post a message to another channel than the one I webhooked. And I can not do it as myself(under my slackID), just as the App. Problem is I have to do this for my company, ...
Why should I use SerializeField?
I have just started to learn C# and Unity, and there is one thing that I can not get used to: Why and when should I use `[SerializeField]`? Is it bad to leave variables hard coded despite using `[Seri...
No Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator
I am trying to consume an API using Retrofit and Jackson to deserialize. I am getting the onFailure error `No Creators, like default construct, exist): cannot deserialize from Object value (no delegat...
Adding Serilog ILogger to a static class
I'd like to add a Serilog `Log` to a static class in my program like this (`DataHelper` is the class name): ``` private readonly ILogger _log = Log.ForContext<DataHelper>(); ``` But this leads to t...
Random Selenium E2e Tests Fail because of timeouts on Azure DevOps but work locally and with remote Selenium (BrowserStack Automate)
I've got a suite of Selenium tests that work perfectly in my local environment and using Browserstack Automate, but fail on Azure DevOps. There are no configuration or setting changes when running ...
- Modified
- 20 Nov at 14:30
How to catch ASP.NET Core 2 SignalR exceptions on server-side and handle them on client side with JavaScript?
Context: There are differences between ASP.NET SignalR and ASP.NET Core SignalR you can read [here](https://learn.microsoft.com/en-us/aspnet/core/signalr/version-differences?view=aspnetcore-2.1). As...
- Modified
- 19 Mar at 19:26
For a .Net Core 2.1 project, Why does Nuget restores .Net 4.6.1 packages?
If a package is not available for .Net Core `Install-Package` > Install-package command, why does Visual Studio even, restores .Net 4.6.1 version, just to give a runtime error at later stages! I'm...
Problem understanding covariance contravariance with generics in C#
I can't understand why the following C# code doesn't compile. As you can see, I have a static generic method Something with an `IEnumerable<T>` parameter (and `T` is constrained to be an `IA` interfa...
- Modified
- 2 Dec at 07:56
C# how to check for null. (value is null) or (null == value). Can we use `is` operator instead of == operator
C# how to check for `null`. `(value is null)` or `(null == value)`. Can we use `is` operator instead of `==` operator? C# 7.0 supports const pattern with `is` operator. So we can use `is null` for al...
How to start an async method without await its completion?
Sometimes I need to start an async job which works very slow. I don't care if that job success and I need to continue working on my current thread. Like sometimes I need to send an Email or SMS which ...
- Modified
- 15 Feb at 08:18
How can I await a minimum amount of time?
I have an async C# method where I am getting an HTTP resource, and I am doing it in an infinite loop. However I don't want to hit the resource too quickly. My current code is: ``` HttpClient http =...
- Modified
- 7 Nov at 00:16
Auto-saving files upon changes with Visual Studio Code
I have used [WebStorm](https://en.wikipedia.org/wiki/JetBrains#WebStorm) from JetBrains for almost four years now. It's a fantastic IDE for many reasons, but one of the best features is that it saves ...
- Modified
- 21 Jun at 21:27
How to unit test a custom JsonConverter
I have a json payload that I want to deserialize in a non-trivial way. ``` { "destinationId": 123 } ``` The target class is ``` public class SomeObject { public Destination Destination { get; ...
- Modified
- 22 Oct at 11:31
How can I get Visual Studio to use Embedded Source code whilst debugging?
I have embedded the C# source code into a portable PDB file using the `<EmbedAllSources>` element in the csproj file, and I have embedded the pdb into the assembly using the `<DebugType>embedded<Debug...
- Modified
- 15 Nov at 12:55
Converting IConfigurationSection to IOptions
The Options pattern allowed me to create options objects containing values from configuration, as described here: [https://learn.microsoft.com/en-us/aspnet/core/fundamentals/configuration/options](htt...
- Modified
- 18 Apr at 00:26
What is useState() in React?
I am currently learning hooks concept in React and trying to understand below example. ``` import { useState } from 'react'; function Example() { // Declare a new state variable, which we'll call...
- Modified
- 17 Sep at 21:15
Add comments in App.config in Winform application
I'm developing a windows application with C# . I need to add some comments into Application settings ( App.config ) Here is my App.config
- Modified
- 7 May at 03:52
Service Stack Rate Limiting
I need to rate limit specific end points rather then all end points in the API application. By default, the rate limit feature enforces rate limiting to all service end points. Is there way to enable...
- Modified
- 5 Nov at 23:39
Convert AutoQuery query string to SqlExpression
I am trying to re-create AutoQuery queries outside of a service request. I am doing this because I give user option to save a request and then use that data elsewhere. I save the query string data s...
- Modified
- 5 Nov at 20:44
How to generate the appsettings.<EnvironmentName>.json file?
I have an ASP.NET Core 2 WebAPI which will be deployed across the following environments: INT, QA, STAGE, PRODUCTION environments. Based on the above, I need to have `appsettings.<EnvironmentName>.jso...
- Modified
- 12 Aug at 21:17
Could not load file or assembly 'System.Data.SqlClient, Version=4.4.0.0
First of, some context information: The platform this is running on has .Net Framework 4.7.1 installed. I have a Class Library that is in the .Net Standard 2 specification in order to support .Net C...
- Modified
- 5 Nov at 17:28
Get scroll position with Reactjs
I use reactjs and want to handle scroll with `click` event. Firstly, I rendered list of posts with `componentDidMount`. Secondly, by `click event` on each post in list, It will display post detail a...
- Modified
- 27 Sep at 13:43
What is compiler warning CS1723 "XML comment has cref attribute 'T' that refers to a type parameter" all about?
Given this code: ``` /// <summary> /// Implementations represent a configuration with a specific data /// type <see cref="T"/> that can be used by this application. /// </summary> internal interface ...
- Modified
- 20 Jun at 09:12
Why ReadOnlySpan may not be used as a type argument for generic delegates and generic methods?
I understand why `ReadOnlySpan` may not be used as a type argument for generic classes. `ReadOnlySpan` is stack only and therefore it cannot be used as field types, field members live in the heap like...