Category "c++sharp"

VirtualizingStackPanel with cache

We have to requirement to virtualize a ListView/ItemsControl with a VirtualizingStackPanel. Although everything works as expected, the Control's ItemTemplate ad

Is there a possibility to set RefreshTokenUsage in oidc client?

i have a problem with my token. when we start our program, the cache should be checked for a valid token. This works for the first time, but afterwards refreshT

check list of gameobject has active gameobject and insert into other list

i have a list of gameobject and I would like to check if each of those is currently active in the scene. The following is my code. foreach (GameObject hazard in

How to prevent automatically rounding the decimal part of the number in .NET 6

After I converted the version from .NET Core 3.1 to 6.0, I figured out that all decimal(10, 5) type columns were automatically rounding the decimal part of the

Cannot fill in a word in google flight website using selenium with C#

I trying to fill in the word "LHR" in the 'from' filed in Google flights website. But after typing the letter L the program exit and finished successfully witho

When I add SCEditor to my Blazor project, the editor keeps appearing in strange places, sometimes in multiple copies. How do I fix this?

I want to use SCEditor in my Blazor page. For example I create a new Blazor WASM project and I did these steps: According to documentation I add this codes and

C# SQL query with user input

I tried to make software that could be use as a database for libraries so I started to learn SQL I alredy did way to save a book into the database but I am stuc

Unable to send acknowledgemnt properly in TCP connection (C#)

I have a client server model. 192.168.77.6 is the client (my code). 192.168.77.18 is a server device. I am sending a request to the server for a response. Once

Why my server program prints the first letter of the message I sent from client in C#?

I am trying to send a message from a Socket client I created in C# on an Android device to a TCPListener server on my PC. The message is sent and I can see it p

How to sign data with RSA private Key on Javascript/jquery

I got this C# code but I need it to be done in Javascript. The idea is that I need to execute this bit of code when there is no internet in the browser, basical

Animations problems c# unity

I've been trying to create a game on unity and while I was trying to do the animations I'm realizing that I don't have any idea why my code is not working. //An

EF Core 5.0 Many-To-Many delete from nested collection

My models are like this (simplified): public class Request { public string Id { get; set; } public List<Tag> Tags { get; set; }

ASP.NET Core Web API - How to implement optional validation using Fluent Validation

I have this validator using Fluent Validation in ASP.NET Core-6 Web API : public TransactionValidator() { RuleFor(p => p.Token) .Cascade(CascadeM

How to seed data in .NET Core 6 with Entity Framework?

I know how to seed data to a database with old .NET 5.0 in startup.cs file using my Seeder class with a Seed() method creating some initial data. public void Co

C# Webapplication: Why is session usercount (in global.Session_Start) different from hub usercount (in hub OnConnected)

I want to display the number of currently active users. I first realized that in global.Session_Start protected void Session_Start(object sender, EventArgs e) {

System.Timer in .net core not tracking time correctly

I have this piece of code: public void StartTimer(string roomName) { var roomTimer = GetRoomTimer(roomName); var room = GetRoom(roomName);

Project currently contains references to more than one version

I am getting the following error. I tried to add references but I was unable to find a System.Web.Http in it. Please advice how to resolve this issue? The proj

Microsoft Visual Studio stuck in debugging mode

Whenever I run my code I am given an error messaging (error msg below) saying It is stuck in debug mode, and the console does not give me a string message for t

EmguCV C# ApplyColorMap Conversions

how do I correctly convert BitmapSource to Mat (to use it as input for the "ApplyColorMap" function)? I currently use this code: private static Mat ToMat(Bitma

Unable to start program, Access is denied C# net6.0

I have this issue where some of the projects I created for.Net6 throws the error shown in the image attached In this instance the project was running fine, sud