Category "c++sharp"

Email Auto-Replies not going to Reply-To Address

I have a web app that sends emails via smtp on behalf of the user to their customers. I am able to put the user's email in the reply-to of the email and this wo

Equivalent functionality of Matlab unique() in MathNET.Numerics?

Is there a MathNET.Numerics equivalent of Matlab’s unique(A, 'rows') (or unique(A)), where A is a Matrix<double>? I have searched extensively throug

How to use HttpClientFactory with AutoRest generated client

AutoRest generated client don't have suitable constructor for use it with services.AddHttpClient() method. So how can we get around this? Now we have public co

How do I create a textBox autoCompleteSource from dataset table?

In my Winform I have a TextBox. I set it to "AutoComplete", and I want to know what to write in my code (c#), to set it's "AutoCompleteSource" to some column's

I got this error "Unable to resolve service for type AspNetCore.Identity.SignInManager" when I use ApplicationUser instead IdentityUser

I have a .NET Core 3.1 Web Api and I created an ApplicationUser class that inherits from IdentityUser because I need to register some others properties. But whe

string.Compare(String, Int32, String, Int32, Int32) is not compared correctly for Thai Culture in .NET 5.0

In the code snippet below. In the case of Thai Culture, the result should be -1, but it is 0. Is anyone aware of the reason for this? public void CountryCulture

Visual Studio Decompiled Source Definitions from Object Browser

In Visual Studio 2019, there is a new feature powered by ILSpy to view decompiled source definitions(C#). It's documented here. This is a great feature and when

Prism 8 , IDialogWindow keynotfound Exception in WPF C#

I used Prism 8.1 and Unity in my WPF Project. I want to implement IDialogWindow but get exception error... Prism.Ioc.ContainerResolutionException: 'An unexpect

Dynamically resize TabControl and Form width to the number of TabPages

I have a windows form with a TabControl and a ListView. When I run the application, I want the Width of the TabControl to increase/decrease to show all the TabP

Error Object Id' is unknown when attempting to save changes. Adding Many to Many to the DB

I have objects with many to many relationship. public class Executor { public long Id { get; set; } public string Name { get; set; } public List&l

ASP.NET Core form ignoring asp-controller

I'm working on an ASP.NET Core application. Part of it is an image gallery which allows the user to upload images. On localhost this works as expected, but when

combobox tostring() returns object instead of value

I want to retrieve the string value selected in a combo box and convert into an integer, however the SelectedItem method always returns the name of the object.

Why is static Configuration.GetSection() not available?

In my ASP.NET Core 3.1 project I am trying to read a configuration option from "appsettings.json" via dependency injection service container just as explained b

This site can’t provide a secure connection asp.net core from dotnet linux

I am currently developing an API using asp.net core 2.1. When I use the ide visual studio 2019 in windows I don't have problems running the project, but now I

The Enter Key does not close a Form if the Focus is on a Button that is not the AcceptButton

I have a modal Form with three Buttons, A B and C. In addition, I have two Buttons: OK and Cancel. The OK Button's DialogResult property is set to DialogResult.

Does exposing some methods of a class through an Interface break any SOLID design principle? [closed]

I understand interface segregation and single responsibility principles guide against a class implementing methods or property it doesn't need

WPF goes to the top of each pages when navigating/reloading page

I'm very new to WPF .net 5.0 framework. Every time I navigate to a different page in a frame, it maintains the scroll position instead of going back to the top

Deserialize json with dynamic objects that starts with pattern

I'm trying to deserialize some json that looks like this { "id":"2021", "descriptions_bg":[ "30231300", "30233160", "32420000", "3

How to support for Windows 11 "Snap Layout" to the custom maximize/restore button in WPF?

I have a WPF app using a custom Maximize/Restore button. In Windows 11, mouse hover on maximize/restore button does not pop up snap layout feature like below:

Multiple values single data trigger WPF

I have the following piece of code. <Button.Style> <Style BasedOn="{StaticResource {x:Static ToolBar.ButtonStyleKe