Category "c++sharp"

Sharing generic code between UWP projects

I'm developing an UWP app via C#, that uses IBasicVideoEffect with IDirect3DSurface. As mentioned in documentation, I have created Windows Runtime Component (Un

How to test MassTransit saga state machine with certain state?

I have state machine build with MassTransit: public class OrderStateMachine : MassTransitStateMachine<Order> { public State Completed { get; init; }

Can Unity handle perfectly multiple render of differents sizes of the same picture?

If I have two pictures slots in my game, one displayed as an icon and one displayed as the full image. Should I have two differents pictures in my Resources fol

How To Chanage OpenXml Wordprocessing Text Direction?

I'm trying to open a word document and change its text direction to correct ones, here : IEnumerable<DocumentFormat.OpenXml.Wordprocessing.Text> texts = d

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);