Category "c++sharp"

How to filter excel file using three or more criteria and copy the filtered data to another sheet using powershell

I have a excel table as below: excel data I want to filter this file based on three criteria i.e. $criteria = "Rice","Vegetables","Butter" and copy the filtered

CS0120: An object reference is required for the nonstatic field, method, or property 'foo'

Consider: namespace WindowsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent();

How to find where an object is located in a list?

i have a list "players" and i want to find if my player is players[0] or players[1] or whaterver. How do i do this?

.NET 6 System.IO.FileNotFoundException: Could not load file or assembly System.Linq, Version=6.0.0.0

I am trying to migrate a project from .NET Core 3.1 to .NET 6. I have followed the official migration guide from Microsoft. During build in startup.Configure I

Unit Testing - How to build tests around domain entities with lots of encapsulation and many internal states

Admittedly, very new to Unit Testing right now but I'm wanting to make sure I don't end up with a testing project that ends up being a nightmare to maintain. Th

Telnet connection not writing tab to a file

I have a C# WPF application that is making a Telnet connection to write some content to a file on a Linux system from a Windows system. So say I have some text

.NET 5 to .NET 6 migration - How to fix appsettings.json data being read as NULL after migration? Dependency injection not working

In .NET 5 we have some settings that are read from the appsettings.json file. Now that we have migrated the code from .NET 5 to .NET 6 the model we created to h

OmniSharp fails to load properly in Visual Studio Code

I've recently started to write in C# on VSC using the 'C#' extension by Microsoft and I've been noticing that intellisense doesn't work at all. Every time I ope

aerender from C# console Application

I'm trying to render an Adobe After Effects composition from a C# Console Application but it's not working. It doesn't even give any error, the code executes sm

How to set default values for a query param with array type in .Net.Core with Swashbuckle by code

I am currently working with .NET Core 3.1 and Swashbuckle library. I have made several endpoints with requests decorated with attributes and proper swagger desc

C#: Update List Item

public class person { public string name { get; set; } public string family { get; set; } } And I have a list of the same as Below: List<person&

Avalonia style selector doen't works on derived classes

I'm having an issue to style my custom control derived from button. I inherited the Button class to add a DependencyProperty to it: public class IconButton : Bu

How to call RedirectToAction in asynchronous Task methods?

I am using MVC aspnetcore dotnetcore 6.0 I do an authorization with a LoginController. When it is success i want to redirect the user into HomeController. But R

Xamarin.Forms : Error running program in debug mode after reinstalling Visual Studio 2019 v 16.11.11 preview 1.0

I had to reinstall Visual Studio 2019 after a Windows 10 crash. My program was developed under VS 2019 16.9.3, and the reinstalled version is 16.11.11 preview 1

.Net JsonSerializer does not serialize tuple's values

JSON serializer returns an empty JSON object. using System.Text.Json; (int, int) tuple1 = (1, 2); var token = JsonSerializer.Serialize(tuple1); // return empty

Closing the first form in C# to show the second, but after closing the second the first comes back

So far, this is the button click event to instantiate the other form of the button. It pops up the other form—but the first form is still in the backgroun

Visual Studio does not recognize a referenced assembly?

Opened an old project from years ago. Build fails because Visual Studio (2019) does not recognize an assembly that is clearly there - specifically, Autofac. You

How to get Line Count in MS Word?

I am using Word Interop to calculate the number of lines present in a Table Cell. The Cell in question is shown below (Special characters enabled for clarity).

Create A DLL to work on a solution targeting Master ARM64? (Hololens 2)

I develop applications targeting the Hololens 2 platform (mixed reality). The general idea of the application I am trying to build is using a point cloud regist

Slowmotion time limit

I made a player in my game, such that it goes into slow-motion when you hold down the space bar. But I want the player to only be available to be in slow-motion