In many times people have asked me some question about strings in C#. The much quoted question is about: “What is the @ before the string?”
So, now I want try to give some pills about those strings in C#.
Just to be clear, I’m assuming that you already know a base of C# and strings operations (concats, escaping, etc.)
Continue reading “Pills of C#: strings”
One of my libraries on GitHub is the DewRestClient, a simple library that can help you to make REST request in .net. The library is writte in .net standard so you will be able to use it in a .net core, xamarin, uwp, etc. project.
Lets see how it works.
Continue reading “A REST Client in .net standard”
With asp .net core we have another concept of website.
There is not a scripting language with an interpreter, but we have a software that is listening on a port.
This mean that, the code in Program.cs and Startup.cs files will be executed just the fist time, at program launch. In fact, the Startup.cs file contains the Startup class, that built the middleware pipeline and it will be executed at any request.
So, a big problem that we can have with a config file is this: to any request, we need to read it from the disk, and this can be very expansive with an huge number of users.
A first way to fix this is to use AddJsonFile in the Program class when you build the configuration, and to use like explained here.
However, I use another way to do this, because I prefer access data via dot notation.
Lets see the alternative way to use a config file.
Continue reading “Create a config file in asp .net core”