Category "c++sharp"

.NET Core Worker service host as a Windows Services (using Coravel for task scheduling)

I have created a worker service to schedule a task using Coravel is a .NET Standard library and it is working as expected. I want to host the same as a windows

WPF Datagrid seems to keep validation error references even after a new item source

I observed a very strange issue related to WPF DataGrid validation that occurs only in some conditions. To reproduce the issue I have a test window. <Window

Compilation error after publishing individual Razor page. Persists after publishing entire project. ("Compilation references may be missing")

Today I was working on a .NET Core 3.0 project (VS 2019). I added a CSS class to a <span> on one of my pages. That's it. Nothing else. I figured publishin

Move a SVG icon along a Path in Xamarin.Forms

Is there a best practice on how to animate and move a SVG icon along a path of (x/y) coordinates in Xamarin.Forms? With Xamarin.Forms.Shapes there is the Path c

Dot Net File Name to Replace,

How to Replace File Name from Folder structure have Multiple files want to Remove special characters in all fileName at a time. String rep = Regex.Replace(files

How to parse a string to integer?

I want to use the CalcEngine library for doing mathematic calculations in textboxes. The following codes are a part of the whole project. Why is it giving an er

How to get double value when dividing an integer variable by a constant number in C#? [duplicate]

The followings are some parts of my code. I use the calcengine library for doing mathematical operations in three textboxes. I want to get a r

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