Category "c++sharp"

How to load an application to systemtray using Avalonia

How can I load an Avalonia application to the systemtray and set the menu items?

Formula to make the ends of the arms of a spiral galaxy less dense

I want to make a spiral galaxy in Unity 3D using C# ( i use a derived logarithmic spiral ). I want to set the end of the arms less dense than the middle, but mi

The Name DoEditButtonChecked does not exist in the current context C#

Very new to all this. Was working on my game in unity and got an error. I tried restarting unity, I tried asking for help in other places, and got no response.

Programmatically creating WPF/ASP.net CRUD UI from Database

I have a requirement to build forms directly from a specific dataset format. I've gone one step of being able to create the database from the dataset using F#.

How to do error handling with EasyNetQ / RabbitMQ

I'm using RabbitMQ in C# with the EasyNetQ library. I'm using a pub/sub pattern here. I still have a few issues that I hope anyone can help me with: When there

New line character from c# to cshtml

I am making a webpage... the controller is written in C# and the webpage is in cshtml. In the c# file, I am constructing strings to be put into the table on the

Force MVC CookieAuthentication to timeout prematurely, then setup combination of sliding and absolute expiration

I am maintaining a website that using cookie authentication in a ASP.NET MVC5 application. When the application went live the cookie time out is set to a very l

Grab object values during runtime for creating Mock objects required for writing Unit Test

Consider the below class which needs to be tested, class ToBeTested { Employee _e; public ToBeTested(Employee e) { _e = e; } void Process() {

Optional section was not defined error in nested layout pages

I have a _Layout.cshtml file that contains the following line. @RenderSection("Scripts", required: false) And then I have a StorageLayout.cshtml file that spec

Entity Migration. Could not drop constraint. See previous errors

Here is the code that produce this error. I've tried solution for renaming the AddForeignKey but the error is same. 'PK_dbo.Item' is not a constraint. Co

System.ObjectDisposedException: 'Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope

I have an async controller and I am trying to call two different Async functions from it. like this public async void Approvefiles(string[] data) {

What's the VB.NET equivalent of async delegate in C#?

I'm trying to convert the following extension method (source) from C# to VB: public static Task ForEachAsync<T>(this IEnumerable<T> source,

WebView2 JS injection returns empty json string

With WebView2 for targeting Windows, I am trying to setup my own context menu. Either by selected text or by underlying element pointed by mouse click. However,

Can't get query parameter from HttpRequestData

I'm upgrading my code from .NET 3.0 to .NET 5.0, this changes the sintaxis quite a bit. In my previous code, which is a http request build in AZURE FUNCTIONS .N

send whatsapp messages using WhatsappAPI in c#

I have installed WhatsappAPI from NuGet package manager and tried to implement code but could not register my mobile number through WART (WhatsApp Registration

WPF Label Justify & Distribute Text

I have a Label just displaying a title. How can I justify the text? and how can I distribute the text? Can I use a label or do I have to use another control?

VSTO Outlook Add-in Move folders up and down

i have an outlook add-in in which a folder is selected.Now what i want is, i want to move the folder up and down using C#. Is there someone that can help me in

Converting Python struct.pack to C#

I'm converting some python code to C# and was successful so far, but there's this one part that I don't understand and is arguably the most important part as it

Handling Events from a Service running in a Task in an AKKA.NET actor

I'm using the Prism framework for my WPF application. I have a producer service that runs in a Task and raises a CompositePresentationEvent when a file is found

Content Dialog not showing up WINUI3

I'm trying to show a popup to edit a brand in my app but it doesn't show up. Function where I call the Dialog: private async Task EditBrandAsync(Brand brand) {