Category "c++sharp"

ASP.NET Core error: System.InvalidOperationException: Unable to resolve service for type while attempting to activate

I am following this article: https://code-maze.com/net-core-web-api-ef-core-code-first/ to set up my backend using .NET 6.0 (in article they are using 5). I am

Change default cursor position in ComboBox

I am working on a c# based Winforms Project where I have used a ComboBox filled with some values and Set AutoCompleteMode = Append . Now the problem is whenever

TemplateBinding with IValueConverter

I want to generate a custom button in a WPF-project. I want the button to change its background color in such a way, that the opacity is reduced. Therefore I ha

How to invoke MassTransit consumer using reflection

I am building a inbox transactional pattern approach for "intercepting" messages using an oberserver and filter to log them to a database. The idea is if a cons

Saving data into database table

I have this code that takes two information from user ( username , password ) How can I save these information into database table . Note: I have already made d

How can I add System.Windows.Forms to WPF application when adding via reference/Depenency doesn't work?

Following every guide everywhere: Step 1: Step 2: it works! Huzzah! Except that it doesn't. Instead I get yellow triangles: This project is tiny for now becau

Error: Xamarin bin and obj folder empty and build failing [duplicate]

I'm building a Xamarin project for Android and IOS on Visual Studio 2019 but my bin and obj folder when I compiled where empty all of a sudden

Add SOAPHeader to each request [duplicate]

I'm very new about this topic, so I'm sorry if my problem explanation will be not very clear. I'm using Visual Studio 2019 c#, and I'm creatin

How to attach Security Token(saml) to Soap request in C# Connected Services

I have 2 connected services (WSDL) in Visual Studio project. One of those services is used to get a Security Token with a SOAP request. Then part of this respon

How can I remove extra spaces, special characters, and make string lowercase?

I'm pretty bad at Regex (C#), so I break things down into parts. The goal of the following series of Regex statements is to take an arbitrary string and reduce

is there a way to tell at run time which type of app c# code is running in?

In a Visual Studio 2022 .sln there are 2 projects. One is Windows Service, another one is ASP.NET 6.0. Both use a shared code to retrieve xml data such as SQL s

Defining a variable with Interface or with Class

this popped into my head recently: We have an Interface: interface IPerson { } and a Class that implements said Interface: class Person : IPerson{ } Now, what

Camera rotation system isn't orientating itself properly

public GameObject player; public Rigidbody rb; private Vector3 offset; public Vector3 minCamAngle; public Vector3 maxCamAngle; void Start() { rb = play

How to get MS Teams (Desktop App) language programmatically?

Using a Desktop Teams application. Based on the language set in the Teams application, want to show customized content to users through my EXE written in C#. Is

EF Core 3.1 value object is nullable after add migration, while in Fluent API it's mandatory

I have created a ValueObject called Discount as below: public class Discount:ValueObject { public int Value { get; } public DiscountUnit Unit

Having trouble with this method in c# wont clear variables

I am trying to save current variables into list and then clear variables static void SaveInvoice(string name, string brand, double tireSize, double metalPri

Read from SQL Server table with C#

I have read a lot of posts about SQL Server, C# and read out of the databases. I have two topics I would found a solution for: I read an registration template w

CS1612: Cannot modify the return value of 'Transform.position' because it is not a variable

Scripts: using UnityEngine; using System.Collections; public class camerafollow : MonoBehaviour { public GameObject target; public float scale = 4f; public Vect

Changing String From Another Model

Is it possible to change a string from another model, basically we have a simple login page which takes the username and then directs you back to the index main

Not getting Confirmation code while trying to confirm emails using Identity methods. ASP.NET Core MVC

When i try to send confirmation email to user and then click provided link, i get current userId but not "code" like token or something, here is the classes: Co