Category "c++sharp"

Extreme UDP-Package-Loss in HoloLens2 -UWP-Application

In my HoloLens2 application sometimes the UDP-Package-receive rate drops instantly from 40 packages per second to 0-2 packages per second and stays there (size

find the smallest integer N, such that

I am stuck for quite a while now on the following task: find the smallest integer N, such that A^N < N! I want to do this in C# and A can be so big that ther

.NET Core 3.1 Writing file to network drive

I am trying to get user to upload a document from the web interface and have it stored on the network share *\dfsms\shared\MyProject* , it also saves the entry

C# array issue due to indexing of int

I am fairly new to this and trying to learn. I am struggling trying to make a loop to find the max value in an array. I am not sure what I am doing wrong. I hav

Session not working in ASP.Net Core Web API

I am trying to use the session capability in ASP.NET Core Web API (.NET Core 3.1). As a test, I configured my project as follows. Install NuGet package Microsof

EF Core - Unable to resolve service for type DbContext while attempting to activate ApplicationContext

I am attempting to scaffold CRUD razor pages using entity framework but the code generator throws the following error: There was an error running the selected

Convert Word doc and docx format to PDF in .NET Core without Microsoft.Office.Interop

I need to display Word .doc and .docx files in a browser. There's no real client-side way to do this and these documents can't be shared with Google docs or Mic

Is there something like Rust's std::option_env in csharp?

In Rust you can inspect environment variables at compile time like so: let sha: Option<&'static str> = option_env!("CI_COMMIT_SHA"); println!("CI_COMM

Can't establish wss connection [React + ASP.NET Core, SignalR + nginx]

I have React app that talks to Asp.Net core API. Both of them are deployed on Docker on my VM. Nginx is installed and configured to resolve domain names for app

Upload File from Angular to .Net

I am trying make a post with my form along with a file. I tried see others posts but without result. If I make the post without the file, works just fine. Engli

VS2022 Configure Azure keyvault not seeing local secrets.json

I want to build an new .net core console application using the Azure KeyVault. I use the connected services wizard and select azure keyvault. It recognizes the

how can I preserve my class after list clear

I have 2 classes public class Product { public DateTime Date { get; set; } public string Name { get; set; } public int Amount { get; set; } } publi

Trouble getting variables to link

I have been trying to build a page that populates a data grid in ASP.Net dynamically. I have created the UI side and backend controls based on what I've found

How to generate empty migration in EF Core code-first while ignoring pending changes?

I am aware that the add-migration command will generate a new migration file with empty Up() and Down() methods. However, I have an error when building which me

Assert anonymous object equivalence

I'm sure i'm missing the obvious... Say we have: [Fact] public void SomeTest() { var a = new { SomeProp = "hello", AnotherProp = 9 }; var b = new { Some

How can I rotate this array?

I have this code that works perfectly but in the opposite direction ( left ) I would like to rotate this array to the right, how can I do this? public int[] Ro

How do I add code outside the scope of Main when using C# 9 Top Level Statements?

My understanding is that it is similar to write code directly into the old "static void Main(string[] args)" without the need to display what's above. However,

Hot to debug playwright-dotnet tests with Microsoft.AspNetCore.TestHost

I'm trying to run Playwright locally by using debugging from xUnit and AspNetCore.TestHost and even if when I call the API endpoints the calls are successfully

Change Page URL Dynamically

I am writing an e-commerce website using DotNetNuke, and I have ran into a problem. For example I have a module on a page that has a URL of mydomain/productTyp

How to fetch data from dot net core in React Native?

Postman Screenshot of dot net core API Postman fetches the data from my dot net core API but I cannot get the data in React native using the same API. I tried e