Category "c++sharp"

How to ignore empty rows in CSV when reading

Trying to read a CSV file that has empty rows (usually at the end) using CsvHelper.GetRecords<T>(). Without the empty rows this works a treat. However i

What is the difference between services.AddAuthentication() and services.AddAuthorization() in asp net core?

I have the following code and i want to understand what is the difference between those two extension methods. What each one do? services.AddAuthentication (Jw

How to convert SqlDataReader result to generic list List<T>

I'm trying to fetch records form Azure database using Ado.net I used SqlDataReader class for that. Even though the data fetch is successful, I don't know how to

Problem with Microsoft.CodeAnalysis on Visual Studio 2019 16.11.6 AFTER install Visual Studio 2022

I am receiving on Visual Studio 2019 16.11.6 these suspicious warnings (Version=42.42.42.42) AFTER install Visual Studio 2022. Any idea? Warning CS8032 An insta

Capture image from Honeywell Imaging Scanner

I am using a Honeywell Xenon Imaging scanner to capture both images and barcode. I have the barcodes working but am stuck trying to read an image. Using Microso

Attributes on C#9 top level statements file

I'm trying to add attributes to a top-level statements file, and I'm not finding anything about it. Is it possible? For some context: I want to disable a rule o

How detect if slot swapping is in progress

Im using .net sdk fluent azure API to change slots. I have two slots, prod and maintenance. I use azure queue trigger function to update appsettings, restart fu

How do I add bits to a MemoryStream

So I've been trying to add bits of a value to a MemoryStream but the issue is I have no idea how. I've seen that it's used for performance when it comes to netw

Create Document in Google Cloud Firestore Using v1 Client Library Wrapper

I am trying to create and add a document to GCP Firestore using the .Net library for GCP: Google.Cloud.Firestore.V1 , however, I cannot figure out how to use th

HttpClient using FormUrlEncodedContent

I have checked other answers before posting this, so please try not to jump straight to conclusions here. I'm using HttpClient to connect to the API for an appl

Running .NET 5 Api under Kestrel from Visual Studio 2019 ignores launchSettings.json applicationUrl setting

We are having an "only on my machine" issue that nobody can figure out. We have a .NET 5 Api that we run under Kestrel for development purposes. On every other

Simulate key press events on a Mac using C# .Net Core

I have a solution built in C# .Net Core 3.1. When running in Windows I use the Windows Input Simulator package to simulate key presses, but what can I use on a

How to support light and dark mode title bar in wpf c#?

So, I'm trying to customize my wpf app a bit, but thought I would be better to leave the title bar as it is and not do a custom title bar. Problem is, the title

Is there still a Microsoft Authenticator dev API? How can I use It?

I don't know exactly if I should ask this question here, neither if I'm using the exact right tags, but... I need to add a 2FA to a system I'm developing and, w

Trying to invoke a backdoor method in xamarin.uitests getting a failure

I have a xamarin.uitest project and an app project, added in main activity in the app project: MainLauncher = true and the method: [Export("MyInvokeMethod")

Add line numbering to a .docx with ActiveXObject('Word.Application')

Hi i want to add line numbering to the opened .docx file before converting it to .pdf and i really didn't find how to do that on code, it is converting my .docx

How to fix 'Gatt write characteristic FAILED.' exception in xamarin forms?

I am trying to do a GATT write operation in a BLE after Notification where I am getting the value from server. The write operation works fine when there is no p

Perlin noise and negative coordinates

I am working with Perlin Noise and coordinates and want to know how to handle negative coordinates in order to make it not symmetric. Example image of my Perli

See what link was used when new user joins to telegram channel

I am trying to make a telegram bot for accounting invite links. It is supposed to count how many times a certain link was used. I tried to get an invite link fr

Trouble binding ViewModel to View, as part of a ListViewItem DataTemplate with ReactiveUI

I'm having some issues trying to display a view in a ListViewItem Data template in reactive. I have a ListView in, for example ReceiptView.xaml whose source is