Category "c++sharp"

What is a NullReferenceException, and how do I fix it?

I have some code and when it executes, it throws a NullReferenceException, saying: Object reference not set to an instance of an object.

How to validate Azure Blob Storage Shared Access Signature (SAS) URL?

My application allows users to enter an Azure Blob Storage SAS URL. How would I go about validating it? I'm using the Azure Storage Blobs client library, and th

Registering Class Settings into Azure Function App via Dependency Injection

I'm in the process of upgrading one of our Azure Function Apps from .NET Core 3.1 to .NET 6. As a result, I need to implement dependency injection. Our project

How to call tostring method on all objects

I have a school project where I have to make every tostring method appear on every object. Does anyone know how to do it? enter image description here enter ima

MongoDB in C# - Type not null query

I have collection where each document has two fields: "Field1" - string value "Field2" - object value with "Field2.Field3(object).Field4(string)". Now I'm tryin

Best practice to manage entities values and value changing events

Little introduction: we have a complex entity and overgrown business logic related to it. With various fields that we can change and fields that updates from ex

Webclient DownloadFileAsync is way slower than downloading same file from Browser

So I wrote a program which downloads mp3 files from a website. They are about 17mb and if I download them using my browser, each file takes 2 seconds. However u

Is the async keyword required to create asynchronous functionality? Did this functionality change in the recent past?

I'm attempting to show that it is possible for my team to add asynchronous functionality to a currently "fully-syncrhonous" program. Are there any reasons, such

Get the index of the unique item only

I have a list of colors as shown in the expanded code screenshot below. The list will always have 4 color values, but only one of them will be different than ot

ASP.NET Framework 4.8 / 4.7 connected with external SSO by OpenId Connect with Authorization Code Grant flow, returns 404 on /signin-oidc

I'm trying to set up external SSO provider (FusionAuth) to ASP.NET Framework 4.8 project using OpenIDConnect/Oauth with Authorization Code Grant Request. When r

Using Asp.Net Core Viewbag

Layout.cshtml @{ var menus = (IEnumerable<WebApplication.Models.TopMenu>)ViewBag.menus; } <div class="col-md-8"> <!-- Menu Partia

Error in file temp{].rpt Failed to load database information error in crystal report

I am working on C# Winform Application. It is working correctly on my system but when i deploy it and install it on client's Computer it shows this error messag

How to use PdfStamper for Itext c#

I need help: I have the same problem as here: How to fill XFA form using iText? "This document enabled extended features. This document was changed since it was

How to instantiate a prefab with AI pathfinder?

My problem is everytime I will instantiate the prefab with AI pathfinder, the spawning prefab is not moving. enter image description here

C# MongoDB Guid Array

I have a document that is represented using this class public class UnitDocument { [BsonConstructor] public UnitDocument(Guid id, string allocId, Guid[]

Bind custom attribute value to route constraint

How do I bind a custom attribute value to a route? What I want: [ApiController] [CustomAttribute("value")] [Route("{customAttributeValue}/[controller")] public

C# LINQ Filter records in child tables

I have a main table "SALES" and two secondary tables "PRODUCTS" and "SERVICES", I need to select only the records in "SALES" that contain some product or servic

How can I get output value from the stored procedure in C# using Entity Framework

I have connected a stored procedure to a C# program using Entity Framework with a .edmx model. I am trying to get an integer output value to a variable from the

how can i make the object move on that path in unity2D? [closed]

i want my enemy to be move like this in this picture. How can i achieve this in unity 2d.

Can a C# object "kill" itself?

In C#, can an object method invoke the object's own d-tor? and making any reference to the object invalid? I'm trying to build an "object control" in memory sys