Category "c++sharp"

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

Automate user action export

I'm using ASP.NET WEBFORMS and Telerik and I want to export a document with Telerik components. I'm doing this with client export manager of Telerik https://dem

How do I tell my program to go back to a certain point after the wrong answer is selected?

In my midterm CYA game, you come across 2 staircases, left and right. You have the option to choose which one you go to, the right advancing you and the left (e

The corresponding CLR type for entity type cannot be instantiated Table-per-type

Using EFCore 5 I've been trying to follow Microsoft tutorials to create a field in a model class that may reference two other classes. In my case, I have an abs

EntityFramework Navigation properties are null only sometimes

I'm experiencing an issue where all of the sudden my navigation properties are null. the strange thing is it only happens sometimes for the same get. I'm using

mXparser's iff() conditional does not support equality test

I'm using the Java/.NET symbolic math library mXparser (5.0.2) to support user-provided math expressions in my app. Problem I found that the conditional clause

DataGrid not showing in .Droid (Uno-platform)

I made DataGrid that correctly displays data in .Wasm and .UWP, but on .Droid app it doesn't show anything (header or body). The calling to my API works and dat

How do I make a .NET Core 6 Top-Level statement template async?

I'm follwoing this guide: https://docs.microsoft.com/en-us/dotnet/core/extensions/configuration and I don't understand how to make my application work as an asy

EvoPdf.HtmlToPdf isn't rendering foreign languages (Hindi, Bengali)

I'm using EvoPdf.HtmlToPdf with paid license, however, I have noticed that when I'm converting HTML to PDF and downloading, some languages like Hindi, Bengali a

How to check if a filesystem supports hard links in linux?

What's going on here is I have a construct that goes something like this: if (link(source, intermediate)) { if (pathconf(dirname(source), _PC_LI

Problem with transform.rotation in unity c#

I`ve been doing a game and i got a problem , i tried to do a jumping cube but if you jump a lot the cube can rotate , i tried to restrict rotation by using: //

Why is sqlconnection.open nosing around in my config file?

Today I thought, Oh, I'll just add some SQL logging to a C# SFTP custom (console) program we have. I didn't write it, and it has perhaps an odd configuration fi