Url in code not breaking build

During a demo I saw a piece of test code where the developer had pasted an url in the code. And when the developer build the application everything worked, but we where all very curious why the compil...

13 May at 06:39

Azure storage table delete row by row key

I am trying to delete row from azure storage filter by only rowkey value. But I dont see any overload for delete operation where we can filter with only rowkey. Is there any alternative option to dele...

WebClient DownloadString UTF-8 not displaying international characters

I attempt to save the html of a website in a string. The website has international characters (ę, ś, ć, ...) and they are not being saved to the string even though I set the encoding to be UTF-8 which...

9 Mar at 04:31

Does it look like a C# bug for you?

Create a console app to reproduce: ``` struct Test { public static readonly Test? Null = null; } class Program { static void Main(string[] args) { var t = Test.Null; } } ``` ...

13 May at 03:7

Can you use a Visual Studio Database Project in a Unit Test Project to setup a empty database for a functional test?

For years we have used the following code to setup databases in a base class for our functional tests for our DAL, and this has worked extremely well for us. ``` /// <summary> /// Initializes the tes...

How to serialize data into indented json

I am using this code to serialize the users into `json` text file. ``` if (File.Exists(path)) { using (var file = File.CreateText(path)) { var serializer = new JsonSerializer(); ...

13 May at 04:38

How to create T4 text templates(.tt) in ASP.NET core on Visual Studio 2015

I want to create T4 text templates to achieve code generation. All the tutorials I found on msdn suggest following to add a new text template: `Add > New Item > Text Template`, (eg [https://msdn.micro...

How do I navigate to a parent route from a child route?

My problem is quite classic. I have a private part of an application which is behind a `login form`. When the login is successful, it goes to a child route for the admin application. My problem is th...

How can I persist redux state tree on refresh?

The first principle of Redux documentation is: > The state of your whole application is stored in an object tree within a single store. And I actually thought that I understand all of the principles w...

19 Aug at 14:26

How to view log output using docker-compose run?

When I use `docker-compose up` I can see logs for all containers in my `docker-compose.yml` file. However, when I use `docker-compose run app` I only see console output for `app` but none of the serv...

12 May at 18:51

Service Stack inject object

i´m doing an app, using ServiceStack. I could inject an object without problems, but, the object can be modified outside the Service Class, so, i need to re inject again Here is the code: ``` public ...

12 May at 16:32

Build failing on .net Core app due to missing definition

I'm trying to build my .NET Core app from the CLI using `dotnet build`, but every single time I get this error: > 'IConfigurationBuilder' does not contain a definition for 'AddEnvironmentVariables' ...

28 Oct at 14:7

Dependency Injection with classes other than a Controller class

At this point I'm injecting things into my Controllers with ease, in some cases building my own ResolverServices class. . What I cannot figure out how to do is get the framework to automatically injec...

String Object with fixed length C#

I have a class wherein I want to use Strings with a fixed size. The reason for the fixed size is that the class "serializes" into a textfile with values with a fixed length. I want to avoid to write f...

12 May at 14:16

Error:could not create the Java Virtual Machine Error:A fatal exception has occured.Program will exit

I have just installed Java SE Development Kit 8u91 on my 64 bit Windows-10 OS. I set my variables . I tried in my command prompt it gave me an error. ``` c:\Users\Onlymanu>java --version Unrecogniz...

12 May at 11:57

C# Time complexity of Array[T].Contains(T item) vs HashSet<T>.Contains(T item)

`HashSet(T).Contains(T)` (inherited from [ICollection<T>.Contains(T)](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.icollection-1.contains)) has a time complexity of O(1). So...

How do I disable Git Credential Manager for Windows?

I notice that in the latest version of Git, the default is now to popup a "Git Credential Manager for Windows" dialog instead of prompting me for me password at the Bash prompt every time. I really h...

27 Jun at 19:22

Create Merge Cells using OpenXML

Please consider this Excel: [](https://i.stack.imgur.com/MOh2b.png) and it's XML: [](https://i.stack.imgur.com/NoKsv.png) I want to create such this Excel that has multiple merged cells using Open...

12 May at 09:8

ServiceStack Server Side Events and IIS AppPool Crash

I am wondering if anyone could help me with some insight / thoughts on an issue we are experiencing with IIS crashes that may be linked with Service Stack Server Side Events? Our application uses Ser...

How to (repeatedly) read from .NET SslStream with a timeout?

I just need to read up to `N` bytes from a `SslStream` but if no byte has been received before a timeout, cancel, while leaving the stream in a valid state in order to try again later. (*) This can b...

15 May at 02:20

C# equivalent to Java 8 "method reference"

I recently had the opportunity to tweak some Java code and was able to take advantage of some new Java 8 features. In one particular case I needed to get a List of (String) `.Name` properties from a L...

27 May at 15:16

Swagger-Codegen custom settings

I am using `swagger-codegen` to generate my client-side C# classes. It does the job, but there are a few things I'd like to customize: 1) Most importantly, how I tell it which namespace, or perhaps...

3 May at 18:34

Events and multithreading once again

I'm worried about the correctness of the seemingly-standard pre-C#6 pattern for firing an event: ``` EventHandler localCopy = SomeEvent; if (localCopy != null) localCopy(this, args); ``` I've r...

angular-cli server - how to proxy API requests to another server?

With the `angular-cli` `ng serve` local dev server, it's serving all the static files from my project directory. How can I proxy my AJAX calls to a different server?

26 Jul at 12:41

.NET Core/EF 6 - Dependency Injection Scope

I am currently working on setting up a .NET Core application using EF 6, and am having some trouble understanding the appropriate use of the various dependency registration methods. As I understand i...