Category "c++sharp"

How to get EntryID of removed OutlookItem?

I need to synchronize Outlook contacts to another service. I can subscribe to create, change, and delete events as follows: Outlook.MAPIFolder folderCo

How to use ObservableCollection with LiveChart2

How to use ObservableCollection with LiveCharts2 I am trying to implement LiveChart2 using ObservableCollection to update the chart everytime a new value is add

C# WTelegramClient Telegram-API How to programmatically click a button in a message from Telegram-Bot

The program communicates with Telegram-Bot. A text message is sent to the bot. The bot responds to the message. The answer contains 3 buttons. Question: How to

Hiding particular datagridview cell in c#

I have a datagridview in windows form. Datagridview looks like below: In this, have one Checkbox column, two textbox column. My requirement is need to hide che

NLog not logging debug messages

I'm having a problem with logging Debug level messages in a .NET Core 3.1 Worker Service project. Neither my file target or console are getting Debug level mess

Tags not working in Unity C#

I wrote the following code to damage my player, however it is not working. I have checked as many times as I can for coding errors, and I know my problem is the

ASP.NET Core MediatR error: Register your handlers with the container

I have a .Net Core app where i use the .AddMediatR extension to register the assembly for my commands and handlers following a CQRS approach. In ConfigureServi

I'm having a problem with the OnCollisionEnter function in C# while making a game in Unity

So I learned that you can use a function called OnCollisionEnter to do different things on gameObjects collisions. I tried something simple : using UnityEngine

Could not load file or assembly 'System.ServiceModel, Version=4.0.0.0' exception when starting Stateful Service

I have created a new Service Fabric application in Visual Studio 2017 (version 15.7.1) and added a new service using the .Net Core 2.0 Stateful Service template

How do I add a byte array Image to a ziparchive?

My situation: I have a bunch of Jpeg images in the form of byte arrays. I have a list of these objects: public class MyImage { public byte[] ImageData { ge

Visual studio 2022 perform search into .xsd designer

I have a big project with an .xsd file that contains the dataset of all the tables of the database. I use the .xsd designer integrated with visual studio to add

A LDAP recipient not being resolved correctly when calling Recipient.Resolve

I am developing an outlook Addin c# using outlook object model. My Addin code needs to resolve the recipient in order to act on it based on its resolved type (A

Trying to implement a type converter for CsvHelper has no effect

I am trying to globally register a CsvHelper type converter that handles the value NULL for a decimal?, but when I do the registration is ignored and the conver

Failed to load the hostfxr.dll after install net core

Anyone has this problem i change Pc and tried to install net core framework but vs code return this info when i tried to write dontet --info Failed to load th

How to deserialize interfaces with Newtonsoft Json.Net

I have this class hierarchy : public class ProxyBotsSnapshotLogEntryDetails : IBotsSnapshotLogEntryDetails { public ICollection<IBotSnapshot> Snapsho

.Net Core 2.1 - Cannot access a disposed object.Object name: 'IServiceProvider'

I just migrated .NET Core 2.0 to .NET Core 2.1. Everything went fine, but when I try to login now I get the folowing error: $exception {System.ObjectDispos

VSCode won't open console in an external window

I am a beginner in C# just recently learning it soon. Whenever I run my Project.cs file, it does not open in an external terminal despite the launch.json file h

Pad a struct so its size is a multiple of 16 bytes

I'm trying to have my C# struct match up some complex padding and packing rules. Fields should be aligned on 4 byte boundaries. The entire struct should be a mu

Azure Service Bus send message every other time

I've a c# dotnet webjob and a simple desktop app. Sending a message apperaes to work only every other time. serviceBusClient = new QueueClient(_conf

How to get ILoggerFactory in .net 6

In .Net5 ILoggerFactory is used as Configure function in Startup.cs as follows : public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILogger