Category "c++sharp"

Update button in datagrid, entity framework WPF Application

I'm attempting to create an update button, that you can press to automatically update a record within a DB. the update button opens a new dialog, which then all

Is it possible to superimpose an interface on an external class in C#?

In order to hide the concrete implementation of a class behind an interface, for example for dependency injection, I find it is useful to extract an interface w

Problem in Azure DevOps pipeline restoring AutoMapper NuGet package in .net 6

I get the following error message when my pipeline is being run: Package AutoMapper.Extensions.Microsoft.DependencyInjection 8.1.1 is not compatible with net60

How can I get task-specific properties from a MailItem

I've been having a little weekend project for myselff which involves getting all my ToDo tasks from Outlook, put them in a DataGridView and me being able to edi

Mapping columns in a DataTable to a SQL table with SqlBulkCopy

I would like to know how I can map columns in a database table to the datatable in c# before adding the data to the database. using (SqlBulkCopy s = new SqlBul

The server response was: 5.7.0 Must issue a STARTTLS command first. i16sm1806350pag.18 - gsmtp

I am trying to send mail using gmail, and I am getting an exception that is The SMTP server requires a secure connection or the client was not authenticated. Th

Is there a nameof() operator for MVC controllers in C#?

The newly introduced nameof operator is useful in making my code my "typed". Instead of return RedirectToAction("Edit"); we can write return RedirectToAct

Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host

I have an update server that sends client updates through TCP port 12000. The sending of a single file is successful only the first time, but after that I get a

How to delete the current cell in DataGridView?

How can I delete a current cell in a DataGridView. I am trying the code below, but it is deleting all cells except the current one. private void dgvPurchase_C

IEnumerable vs List - What to Use? How do they work?

I have some doubts over how Enumerators work, and LINQ. Consider these two simple selects: List<Animal> sel = (from animal in Animals

playwright- issue with login form - how to navigate to next page

I have a website where I enter the username and password, then I click on the recaptcha field and enter the numbers without any problems but when the login butt

How to change Oxy Plot tracker vertical line thickness?

We are using Oxy Plot plugin in wpf project, it is great tool but I have one small issue. If I change application window size and reset plot axis zoom, vertical

MongoDB BsonDocument - Serialize JSON as key-object

I have a doubt if it is possible to serialize a collection of BsonDocument results as a JSON pair of key objects. For example, I attach a piece of code that cre

Split an avro file and upload to REST

I have created some avro files. I can use the following commands to convert them to json, just to check whether the files are ok java -jar avro-tools-1.8.2.jar

Determine if an object exists in a S3 bucket based on wildcard

Can someone please show me how to determine if a certain file/object exists in a S3 bucket and display a message if it exists or if it does not exist. Basicall

Suggestions for designing complex LINQ code

What are your suggestions for designing linq code in project? Especially, I`m interesting in code design of big and complex linq queries? For example, you know,

Union two list by property

I would like to merge two list without duplicates. It should distinct only by one property. I have a class: public class Test { public int Id { get; set;

Mocking HttpClient in unit tests

I have some issues trying to wrap my code to be used in unit tests. The issues is this. I have the interface IHttpHandler: public interface IHttpHandler { H

automapper map interface to interface or object

How to map objects inherited from one interface to objects inherited from another interface. I have such code structure public interface IDataTranslatable {

Including Pictures in an Outlook Email

I'm trying to use a Microsoft Word document as the body to an Microsoft Outlook email. So far I have been able to include the text from a Word .docx into the bo