Category "c++sharp"

"Top-level statements must precede namespace and type declarations"

So I haven't been coding for long so I'm not so experienced, I recently ran into a problem on replit.com where the console would print out: error CS8803: Top-le

Change to array triggers change in other object

I am currently working on a chess game and I want to implement a Redo button. The way i am doing this is, that the I have a list of GameStateContainer class whi

Ocelot Aggregator doesn't work for post method

Good afternoon community. I present my case and then I ask the question. In ocelot.json I have the corresponding configuration to consume the microservice meth

How to return a random sentence in Twitch chat, using Streamer.bot?

This is a simple functionality I have in my chatbot, but I want to customize it a little bit. Right now, when a user types !lurk, it returns one message. I want

How to sort and remove duplicates from string Array without using the inbuilt function?

I want to remove duplicate string also sort the string array in C# I am reading text file which contains data like Blue, Green, Red, Green, Yellow so I am readi

Want to show/hide Div Query - JavaScript - based on what a sql query returns

My project is a MVC c# Asp.NET project. I want to check if an attachment has been loaded, if there is an attachment it shows the div that contains the attachmen

Outlook Add-in: Am I not aware of some basic, conceptual theories of C# programming?

Win 10 - VS 2019 - Office365 - Exchange Online My first post - woo hoo!!! (Although I have been lurking forever.) I am writing my first Outlook Add-in with my

Client HTTP/2 request on .Net Core 3.1 throw "HTTP/2 error code 'PROTOCOL_ERROR' (0x1)"

I've got a problem with HTTP/2 request by HttpClient to the external service by HTTPS on .Net Core 3.1 : var httpClient = new HttpClient(); var request = new Ht

NLog ApplicationInsights - Instrumentation Key from appsettings.json only loading for TelemetryClient

In my .NET 5 aspnetcore application, NLog is mostly working except for loading the Instrumentation Key from appsettings.json for the logger. It seems to be load

Are there specific issues with .NET Core apps and System.Reflection.Assembly.LoadFrom(...)?

I'm using a tool I wrote that makes a call to the following line in order to inspect a few things, including the assembly version: var assm = System.Reflection.

On DatatableJS server side, how to make a column's order not callback server?

I use datatablejs server-side in my MVC project. When I click to a column it sends the column name to server and I take the column name after all I order the ta

Big button in navigation view. WinUI / xaml

Does anyone know how to make a big button with subtext and a picture in a navigation panel (using xaml)? Like in the Windows 11 settings app. Like this...

How to merge two lists using LINQ Suming a especific field when the id matched

Considering I have 2 list (firstList and secondList), both with same properties, but with diffent values. I need the result merge both lists, but it must consi

How to view System.Diagnostics.Trace.WriteLine output in DbgView?

I have an ASP.net web-site hosted on IIS, and the code calls: System.Diagnostics.Trace.WriteLine("test"); Reminder: You use Trace, rather than Debug, because D

Fetch Products from database with category and subcategory attached

I am building a web api and want to fetch all the products from product table I have in my database and I also want to include the category and subcategory whic

How to compare date in string type in SQL query using MS Access and OLEDB

I am using MS Access as database and using OLEDB. In database I am storing dates as strings. I can't change them in date type (I know it would be easier to work

ASP.NET MVC / Entity Framework - Controller generation is somehow using old properties

After adding and altering columns in the SQL database, I've refreshed the Entity Model (Entity Framework 6) and deleted all controllers and views, to generate t

Office.Interop.Word - app.DisplayAlerts = WdAlertLevel.wdAlertsNone; Not Disabling Alerts

I'm trying to disable read-only alerts when opening word files in C#. I initially tried app.DisplayAlerts = false. This did not work and I believe it's because

Im not able to mock ServiceBusReceivedMessage and ServiceBusMessageActions

we want to write unit-test for servicebus message trigger. we are using Azure.Messaging.ServiceBus nuget package [FunctionName("serviebustrigger")] publi

how to launch AR apps on emulator?

I'm developing an AR app using unity but I don't have an android mobile so I decided to work on an emulator and I read all documentation about it but it didn't