Category "c++sharp"

Hide swagger bad response example model in net core 2.2

I upgrade my netcore 2.1 project to 2.2 and i have a problem with my swagger page. Previously in swagger bad response it only show "Bad Request" without the mo

ASP.NET show dynamic changes on all clients

I'm a beginner with ASP.NET and webapplications in general. For a project I have to interact with an enginnering software to read some data, for this I have to

Transactionscope throwing exception this platform does not support distributed transactions while opening connection object

TransactionScope is throwing a exception in .net core 2.2 In this example I created a scope of TransactioScop. Opening SQL transaction for one database which is

How do I call a string inside a different class? [closed]

I'm trying to call a string that's inside a different class, and am wondering how to do so. Currently my though process is just Console.WriteL

.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