Category "c++sharp"

Download file with WebClient or HttpClient?

I am trying to download file from a URL and I have to choose between WebClient and HttpClient. I have referenced this article and several other articles on the

EF code-first can there be multiple entities in DbUpdateConcurrencyException.Entries?

We are using EF 6.x with RefactorThis.GraphDiff; so that a related entity-tree is saved/updated using EF. We have added RowVersion for each table to capture t

Need to retrieve images (Varbinary MAX) from SQL Server 2014 to Xamarin by using C#

I am new to the Xamarin platform, I have a local hosted database in SQL Server 2014 using php (with aid of XAMP server) and the table name ItemProductsDB and sa

Scaffold-DbContext failed to build, how do i resolve this issue on Nuget console?

I have installed all required packages for this command, when i try to run this command on my console its failed to build. Kindly please assist to resolve this

Where is the Bouncy Castle API documentation?

I need to do some cryptography based work, and I have found out Bouncy Castle API which is both available for C# and Java, for Java it has documentation, but it

Return Window handle by it's name / title

I can't solve this problem. I get an error: The name 'hWnd' does not exist in the current context It sounds very easy and probably is... sorry for asking so

Russia VAT Number validation

Does anyone have code to validate for validating Russian TAX Registration number (VAT). C# code will be great, but if someone have some other language it will b

System.ServiceModel not found in .NET Core project

I have a .NET Core xUnit project. I'm trying to call a WCF service from it but get the following exception: System.InvalidOperationException occurred HResul

Microsoft UI Automation/Get The Item That The User Clicks

I am trying to figure out what item (for example document, web page tab, window, picture, folder) the user has clicked on. I started by using the following code

Windows Form Cannot be Displayed CenterScreen

I used this code for the secondary form to act / be like mdi, this is windows form C# frmFontLoad fontLoad = new frmFontLoad(); fontLoa

Unable to resolve service for type Microsoft.EntityFrameworkCore.DbContextOptions

When I want to add controller using ASP.NET Core MVC with views: enter image description here This is my DbContext class: namespace Infrastructure { public

Preventing Winform from being maximized?

I want to prevent my desktop application from being maximized. It should not become maximized by any means - by double clicking on title bar, or by clicking Win

Converting String to Stream

So I am trying to serialize and deserialize an IReadOnlyList<InkStroke> from Windows.UI.Input.Inking for my UWP app, and I have used the following code to

Creating a Base Class for all entities in Entity Framework 5 in DB first approach

I have few properties like CreatedDate, ModifiedDate, VersionNo on every table. I need to change/ add values for these properties every time I modify the entity

How can I use ActiveDirectoryMembershipProvider with ASP.NET Identity?

I'm learning to use .NET Identity. I have to authenticate to Active Directory. For that purpose I am trying to use ActiveDirecotoryMembershipProvider. I have to

Can't programmatically set follow up on Outlook 2016 taskitem in C#

In Outlook 2016 (and I assume previous versions) you are able to right-click a task and select Follow-up, and then choose when you'd like to have the item follo

Quantower API: How to get the current and previous bar's Low price

Goal: On a 1 minute candlechart using the Quantower API, to get the previous bar's low price, and the current bar's open, high and low price to be used in a str

How to publish Blazor WebAssembly with ASP.NET Core hosted

I would like to know how do I publish a Blazor WebAssembly application with ASP.Net Core Hosted checked. The big problem is that in the application they have 2

Azure DevOps Pipeline - dotnet restore Package Content Hash Validation Fails

I have setup a build pipeline in Azure DevOps for my Function App that takes advantage of nuget caching and thus the package.lock.json file. However, I keep ru

How do I overlay an image in .NET

I have a .png image i wish to overlay on a base image. My overlay image contains just a red slant line. I need to get the red line overlayed on the base image