Category "c++sharp"

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

Entity Framework Core - Relationship between owned child and another chained owned child

I am stuck with Problem, that I am trying to solve the right way. I have multiple one-to-many 'owning' relationships. But I have a duplicate relationship betwee

C# - WCV using class from .net core project

I have some problem with my project, i'm making application in .net core but i also need to create api, i want to make "wcf service" and now i can't use class f

EmguCV never open ".jpg" file but open only ".tif" files..Why?

I am using EmguCV in Visual Studio 2022 and I am simple trying to read and open my image but it only opens .tif image files not .jpg or any other file... When I

WPF - Cannot change a GUI property inside the OnChanged method (fired from FileSystemWatcher)

I want to change a GUI property in the OnChanged method... (in actuality im trying to set an image source.. but used a button here for simplicity). This is cal