Category "c++sharp"

Bold and Italics not working in excel with EPPLUS

I am using the below code for updating excel data format, here I want the heading to be in bold and entire data in italics format but when I run the code all th

show/ hide items in the listbox

I make a listbox and it works perfectly, I also made a search function, but I want to hide the items in the listbox and show them only when searched through ind

How to use SendInput to simulate the UP arrow key press (or other extended keys)

I am trying to programmatically simulate the pressing of the UP arrow key on the keyboard for an end-to-end test. With the below code, the GUI control receives

How to bind dynamic DataTable to DataList?

Code behind: DataTable dt = new DataTable(); dt.Columns.Add(new DataColumn("Rego No", typeof(string))); foreach (var item in list) { dt.Columns.Add(new Da

Testing web API service

I'd like to test the methods of a given Web API service. I could do this by adding a test project, instantiating the controllers and testing the methods. Howeve

Close the application before the form loads

I have a program wherein I will check if a file exists. If it does, the form will load. But if not, a messagebox will appear to inform the user, and then the ap

How to generate line coverage report with vstest.console.exe?

When I run vstest.console.exe with the parameters, vstest.console.exe App.Tests.dll /collect:"Code Coverage" /Logger:html /EnableCodeCoverage App.dll, it only g

Why use Page Factory?

I am a new test engineer and have been reading about Page Object Model and implementing them and keep coming across Page Factory. I understand that Page Factory

C# Problems getting a specific named MAPI property from a .msg

I'm having a similar problem to this question in getting a pair of "custom" MAPI properties from a MailItem in a C# console app, but with the extra twist that i

Unity3D: Detect if mouse has clicked on a UI element?

This is a pretty simple question, but it seems something has changed on Unity in the last versions answers I've found on the internet are no longer valid, so he

How to set up a stub and assigning a webresponse with Rhino mocking

I'm completely new to Rhino Mocks and mocking in general. I'm still wrapping my head around how to code the mocks. I have a test class which contains something

Could not find an implementation of the query pattern for source type 'System.Data.Entity.DbSet'

I'm using Entity Framework for the first time, but it seems not working as expected. I have this code: using System; using System.Collections.Generic; using S

How to get a Kerberos token in Python? I have working C# and PS syntax but would like to convert it

I'm trying to use Python to get a Kerberos security token. I have some C# sharp syntax that does want I need but I have no clue where to begin to converting tha

setting VerticalScrollingOffset programmatically

I'm using a custom scroll bar and the problem I'm facing now is that when I have thousands of rows in a datagrid and scroll all the way to the bottom, dataGrid.

outlook interop application doesn't get all emails C#

I'm trying to get outlook Email using Microsoft.Office.Interop.Outlook but in cases where the folder has a lot of emails (for example 1904 Emails) I'm getting o

Setting proxy for Google Analytics Data API (GA4)

I need to config proxy credential for GA4 Client library to pass it from http proxy server, unfortunately there isn't any rich documentation for this purpose on

How to have an automatic timestamp in SQLite?

I have an SQLite database, version 3 and I am using C# to create an application that uses this database. I want to use a timestamp field in a table for concurre

Why use HttpClient for Synchronous Connection

I am building a class library to interact with an API. I need to call the API and process the XML response. I can see the benefits of using HttpClient for Async

How to create bindable command for custom component in Xamarin.Forms?

I've a custom component where I've button and I'm trying to create a bindable command so that I can perform action based on viewmodel. I've tried few things but

Polly -how do I log final error and continue?

I'm trying to set up Polly in .Net Core 3.1 (Azure Functions v3). I want to create a Policy in the Startup class which I can inject into functions. The beha