⌘BABAKOV.NET Let's code!
100% [dark] [ru]
~/tags/c $

#C#

85 posts

85 total · page 2 / 9

Adding Logging to .NET Core Web Application with NLog

Example of adding logging to a .NET Core Web application based on NLog. Initially, add the NLog.Web.AspNetCore package via Nuget. Then add a nlog.config file to the project root with the following content: <?xml version="1.0" encoding="utf-8"?> <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd" autoReload="true"> <targets> <target name="file" xsi:type="FileTarget" fileName="${basedir}/logs/${shortdate}.log" layout="${longdate} ${uppercase:${level}} ${message}" /> </targets> </nlog>

234 views 0 comments 0 likes ./Read →

Class for Transliteration of Sentences in Russian according to GOST and ISO in C# under .NET Core

Sometimes you have to deal with converting a sentence in Russian to a Russian text but in Latin (translit), for example, when sending SMS to reduce costs - because Latin usually fits more and is cheaper. Or when bringing links to a website in a convenient form without Cyrillic, or simply for sending information to solve problems with coding in this exotic way, there are many options where this may be useful.

313 views 0 comments 0 likes ./Read →

OpenXML - Пример создания Excel файла на C#

В данной публикации приведен пример генерации Excel файла при помощи библиотеки OpenXML. Отличие этой библиотеки OpenXML от Microsoft.Office.Interop.Excel в быстродействии которое на порядок выше. Для работы с Excel документами необходимо у…

1923 views 0 comments 0 likes ./Read →