Category "c++sharp"

How to perform a LEFT JOIN on the same table using Linq?

Consider a table where rows may be linked to each other. We need to select the rows that meet a certain requirement, OR where its linked row meets that requirem

Cannot get installed apps for user | Microsoft Graph API

My application should retrieve all installed apps for every user in the AAD. According to this docs the application permissions are: TeamsAppInstallation.ReadFo

ASP.NET Core IHostedService manual start/stop/pause(?)

I would like to implement a recurring (timed) IHostedService instance in ASPNET Core that can be stopped and started on demand. My understanding is that IHoste

ASP.NET Core IHostedService manual start/stop/pause(?)

I would like to implement a recurring (timed) IHostedService instance in ASPNET Core that can be stopped and started on demand. My understanding is that IHoste

ASP.NET Core IHostedService manual start/stop/pause(?)

I would like to implement a recurring (timed) IHostedService instance in ASPNET Core that can be stopped and started on demand. My understanding is that IHoste

Google API (Gmail) failing with failed precondition 400

I am trying to use the google APIs to read emails and I'm repeatedly failing to get good results. It is supposed to be a server->server account that runs per

Check Keyboard Input Winforms

I was wondering if instead of doing this protected override void OnKeyDown(KeyEventArgs e) { if (e.KeyCode == Keys.A) Console.WriteLine("The A key

Aftter conversion to .NET 6.0, question mark is added to text

We have an ASP.NET Web API project that gets data from Java service that lives in Web Sphere and is exposed as a WCF service. After conversion to .NET 6.0, the

How to make charArray that doesn't separate diacritics?

I'm trying to separate a Hebrew word into letters in C#, but ToCharArray() separates the diacritics as if they're separate letters (which they're not). I'm fine

"Image could not be read." in MigraDocCore on Xamarin Forms

I'm using Xam.Plugin.Media to capture a photo from the camera and I want to use the stream from the image to print it on a pdf. I tried so many ways to do this

iText7 Convert PDF to image while maintaining the highlighting

I am using iText7(C#) and am looking for a way to convert a pdf page to image leave the highlighting. The goal is to create a rendered image (not searchable) of

Is .GetAwaiter().GetResult(); safe for general use?

I read in a few places that .GetAwaiter().GetResult(); could cause deadlocks and that we should use async/await instead. But I see many code samples where this

C# FileSystemWatcher not firing off events - why not?

here is my code... no FileSystemWatcher events are ever hit wen creating a new file into the Foo directory. What is wrong with my code? I am testing this from

EF Core 2.1 - No database provider has been configured for this DbContext

I have ASP.Net Core 2.1 with EF Core 2.1. This is how my DbContext class looks like app.DAL.EF -> Layer using app.domain; using Microsoft.EntityFrameworkCo

C# Process.Start() not starting despite file existing and setting working directory

Question update I'm trying to use a C# script in Unity to call a python program. After following these two links: How do I run a Python script from C#? Proc

'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

I want to access root url of a Web application from a Windows forms Application. string rooturl = Billing_XML_WebTracking.WebForm1.RootUrl; string url = rootur

How to simulate "No Internet Connection" in Unit/Integration test in C#

I have a component that (by part) uses an internet connection. I wrote some UnitTests to ensure that to component is working. However, I would like to test the

Graph API to know when email is sent

I am currently sending emails via Graph API using the following code: var graphClient = GetAuthenticatedGraphClient(); var metadata = JsonSerializer.Deserialize

ZipArchive Read From Unseekable Stream Without Buffering to Memory

Is there a way to read a zip file from a network stream without buffering it entirely in memory? I'd have liked to avoid downloading the entire file before star

Cannot create PdfStamper (NullReferenceException)

I have a specific problem that I cannot seem to resolve. I am trying to create a PdfStamper with the following code. The line marked with --> is where the e