Category "c++sharp"

How to receive attachments from users

How do I receive an attachment from a user? I've tried iterating through the Attachment object to extract the content of attachments, but it's always null: fore

CanExecute works only partial

I am working on a WPF .NET 5 application that needs to handle a longer task using a button command. Until the task is done, the button should be disabled. I am

Enabling and Disabling DataGridView button cell

I have made a DataGridView in a Windows Form with the Name serverListand then added a selection of columns then at the end of each row I have added a button cel

ASP .NET Core 6 with Windows authentification - don't show user login prompt dialog

I've created an ASP .NET Core 6 Web App with Windows authentification from a template and I assume that current Windows user's credentials to be obtained autom

How to set up event handling with prebuild class

I am very new to C# and try to use Microsoft.MixedReality.QR for reading some QRCodes with the Hololense 2 and have problems accessing the events of the QRCodeW

Connectionstring: is it the right form?

I'm new to SQL Database C# projects and I have a problem with connecting to my database in a windows form application which is a single user app and I want to u

Fetch results of unknown Kusto query in C#

I am trying to fetch results from an unknown Kusto query. Example: var query = "StormEvents | count | as HowManyRecords; StormEvents | limit 10 | project StartT

Validation in Winform using Data Annotations

I create a validating class like so: public interface IDataErrorInfo { string this[string columnName] { get; } string Error { get; } } public class Bas

Publishing WPF application fails du to unauthorized .NuGet service index (Azure DevOps)

I want to publish one of my WPF applications (to a folder). The app needs some NuGet packages that I published via Azure Devops. I signed in with Visual Studio

Copy bits in correct order

In order to parse a binary stream of unmanaged data, I have to recreate data types. The data is compressed which means I read 2 bytes which actually represent a

HTTP Patch Delta is Null with oData web service

I am using entity framework code first. My entities and controller were generated by Visual Studio and have not been modified. This issue seems to be that the

Importing exported project templates in Visual studio does not restore packages

I created an project template according to microsofts docs. The project itself requires 3 packages that I installed from Nuget. However upon importing the proje

How can I avoid TimeOut exception using Entity Framework with a stored procedure?

I'm using Entity Framework to call a stored procedure which takes 2 minutes to execute. As a result, I get a timeout exception. Is there any way I can use my

Creating a tree from a collection List<T>

In order to create a tree, I use the following code. var db = _context.GetContext(); var accounts = await db .Set<TradingAccount>()

Why does my visual studio closes automatically without any errors

it is the latest version of visual studio pro 2019 and there is new folder on my desktop named .vs and the desktop folder contains a folder named v16 and it c

Query by an element of an array of objects using C# driver

I have objects like this sample in my database: { "_id" : ObjectId("62623cd94c111e4e73c98e88"), "CDate" : null, "CUser" : "dexadminserver",

Query by an element of an array of objects using C# driver

I have objects like this sample in my database: { "_id" : ObjectId("62623cd94c111e4e73c98e88"), "CDate" : null, "CUser" : "dexadminserver",

Microsoft.Extensions.Logging custom implementation, how to get the caller method name?

I'm in .NET 6, I implemented a custom ILogger<TService> (of Microsoft.Extensions.Logging). Usually, when I implement a logger, I also get the caller metho

Unauthorized when attempting to post tweet api v1 (C#)

Morning all, I've not posted on SO for quite some time, but I need to ask the question, I’ve spent a day and a half trying to get this to work - it’

Passing multiple parameters in c# windows phone app using Frame.Navigate(typeof(Page2))

I am creating a basic MCQ app where 2 MCQ's along with options are showed on a single page and the submit button shows the results on the second page in a textb