Category "c++sharp"

How to re-write menu using DRY

I'm doing a school project and I really feel that I can acomplish what I want in my code, however I feel like i -always- repeat my code. I have tried to put the

ExcelDna use ExcelDnaUtil.Application in other class report error System.InvalidOperationException

I hava a UDFGenerator class and a UDFtest class,in UDFGenerator I created a static variable based on ExcelDnaUtil.Application, and use it in a static function,

Unity, identify line of code that produces the error

Guys I'm new with Unity and I'm getting this error and I can't fix it. Why is the code line not signed?? NullReferenceException: Object reference not set to an

How to write a program with commands?

I would like to write a program that will handle commands like add: And asks for your first name, surname, age list: List the people in a directory remove: remo

Using linq to return records from sql server based on users datetimeoffset

I have a dateTime offset value that gets passed from the UI which looks like startDate:2022-04-25 21:08:02.2973333 +00:00 but the date i entered is actually the

Used IDisposible for Object class but not returing the result to Ajax success in C# MVC [duplicate]

In our application for the last few weeks we are getting memory exceptions. W​herever we used DataSet & DataTable​, we used th

setting NavMeshQueryFilter.areamask to Default Area doesn't work properly in unity

hey so i wanted to create a costume navmesh using NavMeshSurface and NavMeshModifierVolume, however, I have come to a conclusion that if I do something like Nav

c# how to add Button to array and set text of all buttons

Hi my problem is i want to add buttons to array size: 65 and there is a problem here's my code: Button[] buttonsa = new Button[65]; for (int d = 0; d <= but

Inheriting 2 base classes in .NET not possible?

So I am reading that in .net it is not possible to inherit a second base class. How then Can you create an object that serves 2 functions from 2 classes? For ex

How to play sound from .sf2 files in C#?

I'm trying to code a music composer app for my final year project in C# and I can't find any APIs or relevant code that can help me play sound from .sf2 files.

Missing cursors in WPF

Windows Forms has the cursor types Cursors.NoMoveHoriz, Cursors.NoMoveVert and Cursors.Default. These identifiers do not exist in WPF. Is there a way to obtain

Measure bandwidth usage of application using C#

My application uses two separate ethernet-based devices. Each device is assigned a static IP. I want to show the bandwidth usage by each device separately. The

C# ASP.NET Core DI with logging

I'm looking for DI solution for the following problem. I'm writing a custom SeriLog sync that requires a dependency from my serviceprovider. I can't seem to fig

OData Queries on Entities with Dynamic Fields

I am using OData on a dynamic model. The MyObject data is stored in two different ways on the database - in a main MyObject table and in a secondary table of ke

IOCelot Builder does not contain definition for AddAdministration

I'm using .Net core 6 and i get an error on the AddAdministration("/administration","secret") when trying to supports changing configuration during runtime on m

Can anyone tell me why my token API is returning null?

I have an API that returns some information. That API requires an access token. Problem is the JSON is always NULL. My var response and var content is always NU

WebView2 and MVVM in WPF - PostWebMessage

I have created a web application using angular and now I want to load it in a WPF application using WebView2 (not electron). That all works well. However, I als

Improve the build speed of Visual Studio -For Big Project

I have a large .NET project in C # that includes 78 library projects and one MVC project. Most of the projects are related and have been used in the MVC project

Why am I receiving 401 Unauthroized from CardPoint API when using test credentials

I am trying to test CardConnect's API, and whenever I make a request to https://fts.cardconnect.com:6443/rest/auth I receive an unauthorized response. I've trie

.NET6 calling oracle stored procedures with params and refcursor

First time I am using .net6 with entity framework trying to call stored procedure. CREATE OR REPLACE PROCEDURE get_registration ( IDIn IN Number DEFAULT nu