Category "c++sharp"

Xunit integration test dotnet 6 System.Net.Http.HttpRequestException : Response status code does not indicate success: 415 (Unsupported Media Type)

Hello I'm learning integration testing and I want to test a 'POST' method from my controller using xunit and WebApplicationFactory But I'm getting this exceptio

how to scale the AKS Deployments using C#

I have tried using the Patch Class to scale the Deployments but unable to do so. Please let me know how to do it. i have researched a lot but no proper docs on

Differences between IQueryable, List, IEnumerator?

I am wondering what the difference between IQueryable, List, IEnumerator is and when I should use each one? For instance when using Linq to SQL I would do some

Float3 array values are different in compute shader than what I sent them to be as from C# script in unity?

So I am using a compute shader in unity to find groups of vertices that overlap (are the same as) other groups of vertices in a Vector3[]. I have a List < Li

Duplicate keystrokes on cshtml editor

I'm having a strange problem in Visual Studio 2022, and would like to know if someone else faced it. It only happens when editting .cshtml files, on Asp.net MVC

Groupby and Compare the results in Linq

I have the following recordset for a given School (i.e., ABC in this example) , I need to groupby on Class and Activity and take the first row . Then I need to

PRI175: 0x80073b0f - Processing Resources failed with error: Duplicate Entry

I have a Xamarin Forms application which supports different languages. Therefore I have multiple AppResource.[languagecode].resx files. Wanting to add Papiament

Problem with pictureboxes spawning and overlapping WINFORMS C#

I dont want the pictureboxes to spawn in each other or to overlap.

Link the selected item of drop down list to sql script with an on change event

I have been battling this for some time now without success. So Your help is extremely appreciated. I have created a dropdown list from sql database. What I wan

Optimistic Concurrency Exception

I have been battling with this error for a while now. I hope putting it here will help. I have attached by models and also the method call being made. The erro

Implement an SQL query in LINQ

I'm trying implement the follow query in LINQ, but I don't find solution: SQL: SELECT COUNT(*) AS AmountMonths FROM (SELECT SUBSTRING(CONVERT(NVARCHAR(12), pay_

Move object in Unity 2D

I have made this script to move my player with no physics involved: using System.Collections; using System.Collections.Generic; using UnityEngine;

How to correctly update database when users session expires for ASP.NET web application using the new .NET 6 format?

When a users session expires I want to update the database to switch their status to offline but I cannot find the right way to do this as I know that they can

C# Function Overloading in the New .NET 6 Console Template is Not Working

I am getting errors trying to overload the function Print(object) in the new .NET 6 C# console app template (top-level statements). void Print(object obj) =>

Custom authentication with two ADs in ASP.NET Core

I have an ASP.NET Core 5 app that uses the Identity framework on a Windows server. When the user clicks Submit on the Login page, it needs to Authenticate their

Unable to load DLL 'CpuMathNative' on published website

I just deployed my ASP.net website which uses ML.net on a free web host called Somee. Before deploying the solution, everything was working fine and all was pub

How to control and secure blazor spa pwa app?

I have pwa blazor .NET 5 app hosted on github. People use this app at work, installed through chrome or firefox or safari on devices. It works offline and updat

Mongo Authentication failed after docker-compose up

I'm trying to automate my local dev environment with a mongo docker instance. If I up the image with no users or auth, I can connect fine but when I try to crea

Exposing hot observables from class

When composing hot observables in a class using Observable.Create, I will follow the pattern of creating a lazily evaluated field which calls a private IObserva

Comparing two objects with == operator

I have this code that checks the references of two variables, I came across this case which is a bit confusing : string first = "10"; object second = 10.ToStrin