Category "c++sharp"

How can I create a Task that can cancel itself and another Task if needed?

Let's say I have a simple UWP app (so no .NET 5 or C# 8 without workarounds irrelevant to this situation), with many pages that contain buttons, all of which mu

How can I use written code in C# on NX? (How do I compile C# code into NX?)

I have already written code in C# for UG NX in a .cs file, but I want to use it on NX without having to copy and paste it into NX's Journal. I have written the

Accessing the parameters injected in ConfigureServices from custom Middleware

I am practicing to learn more about the Dependency Injection and the Middleware in ASP.NET Core and I have faced an issue I can not resolve, so need the assista

How to display text on a progress bar? [C# WPF]

I need to display a sentence on a progress bar, I've found XAML solutions but I need C# specific solutions, meaning I need to set the text in code. This is an i

SQLite-net-pcl Comparing Dates

As stated in the question I am attempting to do a date comparison for tasks that are done within a specific date range. My model has a boolean called "Done" and

Looking for a way to modify the splash screen list in tModLoader

Im new at modding Terraria with tModLoader, and im looking for a way to modify startup sequence and the splash pictures. Is there any way to do that? Thanks for

joystick positioning relative to screen size

I want the joystick fixed on the bottom-right the screen, no matter the resolution/window size. Although my solution works, there must be a cleaner code for thi

ASP.NET Core 5.0 MVC : CS1061 error using Html.RenderAction

I am working on a project using ASP.NET Core 5.0 to build a web app (MVC). I tried to use the Html.RenderAction extension method but I get the following error.

Web app suffers slow performance after upgrading to Oracle 19c

I have a c# MVC web application (.NET 4.52) using an older version of Devart LinqConnect to scaffold the database etc. The app has been around for 10 years wit

Trying to Edit and Continue on a cshtml file is always throwing an exception

When I make any change to a CSHTML file while debugging then reload the page, I get this exception. This used to work, and I'm not aware of any changes that cou

How do I default a c# Func optional parameter [duplicate]

I would like a Func<float,float> parameter to a method but default it to a static function: public Animation(float timeForAnimation,Vect

Get "corners" of a 2d array

Alright, I've got a real stupid question. I have a two-dimensionial array of nullable integers. I wanna get the non-nullable corners of that array - so like, th

Why is my header data missing from my Azure Function Http Trigger in .Net 5 when calling from HttpClient.GetAsync

I have a client using HttpClient.GetAsync to call into a Azure Function Http Trigger in .Net 5. When I call the function using PostMan, I get my custom header d

C# Convert Integer into Roman Numeral and Number in Words

I need a help because I've created a program wherein if the user inputs enter an integer number then it will convert the number into Roman Numerals and in Words

Can Serilog capture method parameters

I am playing with Serilog and capturing all sorts of great information when an exception is thrown. This new test however is not producing quite as much informa

unity isn't registering the collsion between my player and the obstacles

I have tried for some time to fix the problem I'm having, I've looked at tons of different websites and I can't find what is wrong with my script. The player (W

Cannot display record to DataGridView in winforms

This is what my table "Item" look like in my database: Now, I want to display it inside my winforms application. My application include the main page that look

VS Code file explorer won't show certain files or directories in some projects

I have what appears to be a weird problem. In some project folders when I open them in VS Code I don't see the entire directory tree in the file explorer, some

Subscriptions are not creating in the report server database

I have written the code to create the subscriptions by adding the reference to ReportService2010.asmx. Please see the below screenshot for code and result [Id =

Unity - Make character look at mouse with New input system/Character Controller

Been following this guide https://youtu.be/bXNFxQpp2qk?t=1280 for Character Controller. This got me getting basic movement working and at time 21:20 he creates