Questions

Unpredictible behaviour in c# dynamic

I've found a bug (feature?) during learning dynamic in C#. Can anyone explain me, why do I have an exception?? ``` static class Program { public static void Main(string[] args) { dyna...

30 Jun at 05:39

ASP.NET Core configuration for .NET Core console application

ASP.NET Core support a new configuration system as seen here: [https://docs.asp.net/en/latest/fundamentals/configuration.html](https://docs.asp.net/en/latest/fundamentals/configuration.html) Is this ...

Are async console applications supported in .NET Core?

At some point in time the CoreCLR supported async main entry points. See [http://blog.stephencleary.com/2015/03/async-console-apps-on-net-coreclr.html](http://blog.stephencleary.com/2015/03/async-cons...

26 Aug at 16:53

Can't show Image in React Native

I'm using react-native 0.28.0 I'm trying to show an image on iPhone simulator according to this tutorial: [Introduction to React Native: Building iOS Apps with JavaScript | Appcoda](http://www.appcoda...

15 Feb at 12:26

Is it possible to use default network credentials with Mailkit and Exchange?

I'd like to use MailKit to send an email through our Exchange server, using the credentials of the process. Building up a `NetworkCredential` with domain/username/password **works**: If I use `Credent...

6 Aug at 16:2

Angular 2+ - Set base href dynamically

We have an enterprise app that uses Angular 2 for the client. Each of our customers has their own unique url, ex: `https://our.app.com/customer-one` and `https://our.app.com/customer-two`. Currently w...

5 May at 00:10

Disable PostgreSQL foreign key checks for migrations

I'm creating a lot of migrations that have foreign keys in PostgreSQL 9.4. This is creating a headache because the tables must all be in the exact order expected by the foreign keys when they are mig...

30 Jun at 01:3

Json.NET deserialize or serialize json string and map properties to different property names defined at runtime

I have the following JSON string: ``` { "values": { "details": { "property1": "94", "property2": "47", "property3": "32", "property4": 1 ...

23 May at 11:51

How create a QueryExpression with null field in PocoDynamo

I want query over GSI when a range key is null. I have this code, but it thrown a exception ``` IPocoDynamo dbDynamo = new PocoDynamo(new AmazonDynamoDBClient()); var queryExpression = dbDynamo.FromQ...

Capture screenshot of fullscreen DX11 program using SharpDX and EasyHook

Before anybody mentions it, I refered to [this](http://www.codeproject.com/Articles/274461/Very-fast-screen-capture-using-DirectX-in-Csharp) link to find out how I needed to copy the backbuffer to a b...

23 May at 12:16

Automapper:Converting JSON to list of objects

Source Object (JSON, using JSON.NET if it matters): Destination Object (C#): Automapper config and mappings: Everything works except for the SaaCodes conversion, where Automapper converts each entry i...

23 May at 12:34

How to return html page from WebApi action?

I'm looking for a WebApi example where the default route will return a given html page to the caller. I've got the route and action set up as follows. I just want to send him the index.html page, no...

29 Jun at 17:23

ServiceStack.Text set JsConfig on application start

I set JsConfig in Application_Start method in my asp net mvc application ``` protected void Application_Start() { JsConfig.DateHandler = JsonDateHandler.ISO8601; JsCon...

29 Jun at 15:34

Trying to understand ?. (null-conditional) operator in C#

I have this very simple example: ``` class Program { class A { public bool B; } static void Main() { System.Collections.ArrayList list = null; if (list?....

Is working Universal Windows Platform (UWP) on Linux,Mac,... based on dotNET Core?

I want to know can I use UWP with dotNET Core 1.0 final release for creating application for Mac, Linux and etc or not ? If no, is there any way for creating application based on dotNET Core 1.0 on o...

19 Sep at 08:13

MVC 5 Routing Attribute

I have the Home Controller and my Action name is Index. In My route config the routes like below. ``` routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with pa...

Specified network name no longer available when connecting to SQL Server in .NET

I reinstalled my main work pc, but didn't reinstall visual studio after 5 months. Now i did and started my old project, and now it doesn't run. I get a timeout error when connecting to SQL Server, so...

29 Jun at 13:41

Is there a generic numeric type in C#?

I'd really like a a generic numeric type as the second generic type parameter of the `Func<TInput, THere, TResult>` given below so I can provide either an integer or a double or a decimal as and when ...

29 Jun at 12:31

I don't understand why we need the 'new' keyword

I am new to C#, from a C++ background. In C++ you can do this: ``` class MyClass{ .... }; int main() { MyClass object; // this will create object in memory MyClass* object = new MyClass(); // t...

29 Jun at 17:10

Using nameof to get name of current method

Have browsed, searched and hoped but cannot find a straight answer. `nameof` I am adding my test results to a dictionary like this: ``` Results.Add(nameof(Process_AddingTwoConsents_ThreeExpectedRow...

23 May at 12:34

.NET external configuration server

I am developing a web application which will contain quite a few hosts. I have seen external configuration storages been used in Java e.g. with Spring Cloud Config Server. Are there any non-custom al...

29 Jun at 10:31

Azure Functions binding redirect

Is it possible to include a web.config or app.config file in the azure functions folder structure to allow assembly binding redirects?

Can't get config section after update to ASP.NET Core 2

I updated my project from 1.0.0-rc1-final to 1.0.0-rc2-final which is called ASP.NET Core 2 now. This is how I initialize the configuration builder: ``` var builder = new ConfigurationBuilder().SetBa...

View large multi page Tif images within 100 milliseconds

I'm using WinForms. Inside my form I have a `pictureBox` (set to `normal mode`), next and previous button. I want to resize and load Multipage TIF images quickly. When I go to the next page in the Mul...

4 Jul at 23:10

Provide ArrayPool object to JsonOutputFormatter constructor

After upgrading from .net RC2 to RTM I find I need to supply a parameter to a constructor of JsonOutputFormatter that derives from ArrayPool. How do I get this object? I am newing JsonOutputFormatter...

30 Jun at 01:5