Category "c++sharp"

Connect to AWS MQTT

Trying to connect to AWS IOT device from C# by using M2MQTT library : public void connect() { const string IotEndpoint = "a3cnel9bxxxxx-at

Struggling to create a trajectory prediction in Unity with 2D physics simulation

I have a 2D brick breaker style game in Unity where you get to choose the angle of your shot before each turn with the mouse. I'd like to show an accurate traje

How can I send one characters each time instead of one word in selenium with C#

I wrote the following code. Instead of sending "LHR" I want to send it in 3 sentence each character each time. IWebDriver driver; driver = new C

Moq multiple generics i.e. LoadData<T,U>(string sproc)

I think I'm close, but just can't get the syntax. What am I missing for the Moq on this ? https://dotnetfiddle.net/1RItB5 Method to test public async Task<T&

Problem with configuration in .NET,problem with read a json file

When I'm trying to add the JSON file via.AddJsonFile(), it throws a: System.IO.FileNotFoundException: 'The configuration file 'appsettings.json' was not found

Load Balanced Application - Running Tasks on each machine on demand

So we currently run a console application tied to the start of a web app on each of our hosted (windows) machines in Azure. This runs a process to alter the SNI

Project '..' targets 'net5.0'. It cannot be referenced by a project that targets '.NETFramework,Version=v4.7.2'

I created my initial project that targets Framework version v4.7.2. I needed to add a class library in my project using visual studio 2022 Community. While doin

How to receive data from server to client in C#

My client program takes input from a user in a text box, sends it to a server which processes it by capitalizing the message and sends it back to the client. Th

Outlook VSTO - Allow specific AD group to see ribbon

How can I programmatically restrict the VSTO Add-in Ribbon visibility to a specific AD group only? Can this be controlled directly from the Ribbon XML itself? T

Out of memory crash caused by update function on Unity/Android/OculusQuest

The update function below is causing some kind of memory build up on my builds and crashing the game about 5 seconds into the scene even though everything seems

Response.redirect execute the code inside the pageload twice

I have this link http://localhost:54818/offerslinks/offers.aspx?ID=1 when i clicked it. it loads the page and executes this code twice enter image description

DynamoDB object persistence with System.TimeSpan throws System.InvalidOperationException

I try to save a class with a TimeSpan property. public class MyItem { public TimeSpan MyTimeSpan {get;set;} = TimeSpan.Zero } when i try to save the object

C# WPF Datagrid slow Scrolling

I have a problem with scrolling my datagrid. I am using a WPF C# application with the 4.7.2 .NET Framework. I load about 5000 datasets into a datatable, which I

Hot Chocolate Graph QL.. Extend An Object With Existing Resolvers c#

Is it possible to pass an existing resolver into an Extension of an object method, so I can reuse the resolver? I am getting "Unexpected Execution Error : "No s

How to import shared proto file into local one?

I have project Protobuf.Shared which contains shared proto files. This project is packed into NuGet package. Project structure: - .nuspec - proto - shared.prot

Un-escape specific characters when serializing to JSON in C#

I have a simple task which is to unescape an apostrophe when serializing to JSON using System.Text.JSON: using System; using System.Text.Encodings.Web; using Sy

Why materialSkin.2 buttons are kind of fixed design winforms?

i have a problem when i want to edit a button from MaterialSkin.2 winforms, why this is happening, are they fixed from developers or what

What is the fastest way to determine biome? (Unity2D C#)

I've proceduraly generated map and defined biomes based on this scheme: Take 3 different maps created via Perlin Noise Using presets determine which is the best

Datatable rows select operation showing error when column name has special characters. (C#)

I am trying to perform select operation on a datatable to extract some values from a column. The column that I am targeting has some special characters in it. s

Make Form2 label text value change by combobox and update exactly when combobox was updated

In Form2 I set a public static string to form2text then I set label text value equal to form2text In Form1 under comboBox1_SelectedIndexChanged: Form2.form2text