Category "c++sharp"

Blazor Razor Class Library (RCL) No CSS Intellisense

I have a razor class library (RCL) that contains all the pages from my blazor application. The CSS intellisense does not seem to work within the RCL unless I ch

Is it possible to debug a C# console application using git bash?

I am using Visual Studio Community 2022, and I was wondering if you could use another CLI to run/debug a c# console application. (I can't use cmd.exe or powersh

How to apply seperation in one service for multiple tasks?

I have a service method that does so many things. public Result DoSomething(){ var queryResult = service.GetResult(); SaveResultToRedis(queryResult

Newtonsoft.Json.JsonSerializationException Message=Cannot deserialize the current JSON object

here the ex Newtonsoft.Json.JsonSerializationException Message=Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collection

How can I query for keyboard input in a GUI app without using a pre-built input form?

In a console app, I could put Console.ReadKey() in an infinite loop, and I have what I wanted. But how can I do that in a GUI app? Let's say I'm using the new M

C# forms check when a specific execute has been launched and then run my program

How would I make my program check if a certain application like "notepad" has focus and ultimately open my second form when it does have focus, closing that sec

Cant create an alarm in Xamerin Android C#

Copied my teacher's simplified code in order to see if the code i wrote was wrong or somthing yet even her's isnt working. Here is it: private void BtnAlarm_Cli

How to turn an object into a request in C#

My Model, example: public class Obj { public Obj() { } public int? IdRestricao { get; set; } public int? IdTipoRestringido {

Regular Expression for parsing ASCII data

Right now I have a couple separate regular expressions to filter data from a string but I'm curious if there's a way to do it all in one go. Sample Data: (DATA$

Audio not playing after calling .Play()

I have an AudioManager for my Game. When I try to play a clip on a NPC it doesn't get played. The script itself works because the background music is playing pr

Blazor WASM Load and display large pdfs by splitting them as streams

I'm working on a Blazor WASM App and I want my users to easily open pdf files on specific pages that contain additional information. I cannot distribute those f

How do I make (in C#) a basic .NET application change mouse position on screen, press keys ect

I was wondering, how do I make something like "Program messes with my gameplay" in C#. I just want a program to move with mouse, click, press some keys, you get

MEF vs. IAsyncDisposable or iterate over all instantiated exports

I've shared MEF exports that implement IAsyncDisposable. If an export in MEF implements IDisposable it will be disposed when the composition container (or maybe

Add older documents to stream - based on filter

I created a MongoDB watcher to create actions based on the created document. Of course, the watcher does not detect documents that are created while the service

Code Treats .txt File Differently When Saved

I have an input .txt file that looks something like this. command1 param1 command2 param2 command3 param3 command4 param4 I am trying to reduce the

How to decode unicode characters when using ReadAllText?

Right now I'm trying to add ASCII art to my console project using these symbols: ┌─┬┐ ╔═╦╗ ╓─╥

How to skip endpoint from middleware processing in asp.net framework

I created an owin middleware for asp.net framework. I want to mark some endpoints (methods of controller) to skip them from middleware processing. For asp core

Why Response.Redirect causes System.Threading.ThreadAbortException?

When I use Response.Redirect(...) to redirect my form to a new page I get the error: A first chance exception of type 'System.Threading.ThreadAbortException

Entity Framework : invalid object name "TableName1"

I have a problem with Entity Framework, I think I have a problem defining the one to many mapping, but I can't seem to find it. When I try to save my changes an

Cannot debug C# tests with visual studio code on linux

I have a c# project which I want to unit test. I'm trying to simply debug a unit test in VSCode running on linux, but I get the following error: Failed to start