Category "c++sharp"

Add a "i" variable to a variable name C# [duplicate]

I have a cube1, cube2, cube3 etc... variables and i want to use something like that: for (int i = 1; i < 100; i++) { Location "cube + i

Visual Studio: Centralized Output Folder - No 3rd Party Libraries Copied

I have a C# solution containing many projects (DLL and EXE projects) and decided to centralize the Output folder so that Visual Studio builds all projects to on

Is Using EF Core Value Converter Preventing the Contains() LINQ Method from being Translated to SQL?

I have a Movie class. It has a Genres property of type List<string>. I use this exact EF Core Value Conversion to store it in the database as a comma-sepa

Material doesn't apply properly to the mesh Unity

So I created a mesh (parallelogram) in code in Unity and i have a prefab of this object with mesh renderer, I tried to apply material 1 to this renderer 2 and i

Is it possible to store a KeyValuePair of a dictionary without the use of a foreach loop?

The syntax for iterating over a dictionary with a foreach loop is: foreach (KeyValuePair<key, value> item in dictionary) Inside the foreach loop the key

Use Single Button to select Multi option and Update or Insert On Ms Sql Server

Multi select option list image I Use a multi select option list and create a save button. write a query like that is INSERT and UPDATE same action occur on sing

Nethereum C# BlockProcessor how to set MinConfirmations

I'm trying to process the most recent Blocks with a BlockProcessor in Nethereum. I think by default it is waiting for 12 block confirmations before processing t

C# Compiling my code only works for my PC and no one elses

My code is built in NET Framework 4.7.2, it uses two .dlls siticone.dll + windowsinput.dll. How do I let my code be used by others and include these .dlls. I am

REST API multiple endpoints design

I am currently in the process of building a .NET Web API which is gonna be consumed in another project for a dashboard. Currently, first endpoint return total n

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