Category "c++sharp"

Get ID of item selected in ComboBox

I have a ComboBox that gets filled with items from my database. I'm trying to get the ID of the item that is selected in the ComboBox, but nothing I've tried se

Error 1053 the service did not respond to the start or control request in a timely fashion

I have created and installed a service a couple of times. Initially it was working fine, but after some changes in the service Code it start giving the error wh

How do i change the easy tabs page title to webBrowser1.DocumentTitle?

This is what it should look like: This is what it should look like 2nd Picture: Program.cs using EasyTabs; using System; using System.Collections.Generic; usi

Crash of UWP's HID library

I am developing a UWP application to work with HID devices. The application is working correctly almost all the time. But it often crashes when I close or colla

How to check checkbox a pdf editor form using C#

This is my last hope please help me I am stuck with that check box in pdf editor. I'm using iText library to generate pdf file based on template. But when I try

Groups the specified bookings based on their consecutive dates

var listForTestGroup = new List<Booking> { new Booking{Project="HR", Date= DateTime.Parse("01/02/2020") , Allocation= 10},

How do I obtain 100% coverage when an exception is thrown in a unit test?

In C# you can catch an exception in the default test suite like this: [TestMethod] [ExpectedException(typeof (ArgumentNullException))] public void TestNullComp

Checking file type from base64?

I have a WCF REST Service with the following OperationContract that saves files on the disk: [OperationContract] [WebInvoke(UriTemplate = "FileSave", Method = "

Using multiple authentication providers in C# .net core

We had .net core API already authenticating with AzureAd and then a new requirement came to authenticate the same API using Auth0 as well while keeping existing

Binanace get Order Book in C# .Net Core

i'm part of a MarketMaker team and currently need to get crypto Market Data from Binance. Here are the requirements... get public market data, so dont have api

Find closed loops between a series of connected points

So I've been trying work out how to approach what i initially was a simple problem - turns out i'm an idiot and have no idea what i'm doing. Firstly my data st

Override App.config value with an environment variable

I have a C# console program that prints an App.config value. Can I override this value from an environment variable? Example App.config: <appSettings>

InvalidOperationException: No authentication handler is registered for the scheme 'CookieSettings'.Did you forget to call AddAuthentication()

I am developing an application using ASP.Net MVC core 2.1 where I am continuously getting the following exception. "InvalidOperationException: No authentica

Create mail where Outlook is not running in Administrative rights

The below code works in my desktop application if: Outlook is not running Outlook is running in Administrator rights When Outlook is running normally, the code

The type or namespace name 'Parse' does not exist in the namespace 'Enum'

I have System in my namespace, what am I missing? I am brand new to C# and am following a course on Udemy and following a book titled C#8.0 and .NET Core 3.0 -

extract all URLs in a free text block using RegEx [duplicate]

I'm attempting to detect all URLs listed in a free text block. I'm using the .nets Regex.Matches call.. with the following regex: (http|https)

Auto Close Message Box

I have this program wherein I use timer to redirect to another page. It do work but the problem is when I click cancel button a messagebox will appear and when

C# execute a terminal command in linux

I want my c# application (which I execute on a raspberry pi) to run a bash script whenever it starts.. basically : the script is located in /etc/init.d and is n

Generic Method to Flatten a Collection of Nested Objects into a DataTable?

I have a list of objects, which in turn contain nested lists of further objects. I would like to flatten the object graph into a DataTable. I found code which t

Performance between Iterating through IEnumerable<T> and List<T>

Today, I faced a problem with performance while iterating through a list of items. After done some diagnostic, I finally figured out the reason which slowed dow