Category "c++sharp"

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

How to automatically upload file after file has been chosen

I have the following code for uploading a file in my site: @using (Html.BeginForm("UploadProfileImage", "Member", FormMethod.Post, new { @encType = "multipart/

How to get Priority of C# PriorityQueue element

I am initializing a priority queue that stores XY coordinates, prioritized by their euclidian distance from origin. I created a custom Comparer that makes this

System.ArgumentNullException: Value cannot be null. (Parameter 'connectionString') asp.net Core Docker-compose

I have a dockerized asp.net Core application trying to connect to a mySql Database. Both are running inside a docker-compose. When I test the connection to a lo

Converting EML's to MSG's

We have a webapplication that allows users to view emails in a table and double click on them to open them in outlook. For that we use the (simplified) piece o

Use Middleware for some controllers

In my ASP Net Core application I need to apply a custom Middleware only for specific controller. I found this example app.UseWhen(context => context.Reques

A reference to the dll could not be added. The component is Automatically Referenced C#

I am getting an error in C# Visual Studio and there doesn't seem to be any clear-to-the-point answer to this question online. When I want to add mscorlib, I get

How is Activity.Text encoded Microsoft Teams?

I am writing a custom Teams bot. I got some questions about Activity.Text field: How is it encoded? I see some <at> tags when the bot is @mentioned, but

How do you create Xamarin Forms class hierarchies inheriting from the 'Page' type?

In Xamarin.Forms, I'm trying to create a page that I then subclass, like this: public partial class PageA : ContentPage { public PageA() {InitializeComponent

How to show a Message Dialog in GTK using GTK# (Mono)

I would like to show a dialog inside my GTK# application (I'm using MonoDevelop). Sorry for the silly question, but I'm pretty new to GTK and Linux in general.