Category "c++sharp"

Can't open web project because IIS Express is not installed (even though it is)

I have recently changed machines at work, and a long-standing web project now refuses to open in Visual Studio. The error log reads: "The Web project 'xxx' is

Get Parameters of sqlcommand to string

I'm creating an error log for a webpage. I need a way to get the parameters from a SQL Command to output to string so that the parameters passed through keep th

How to use alert(),confirm() and prompt() function using Blazor?

I am learning the Blazor technology. I started a default increment project in VS 2019 and I have modified the code for Decrement with confirm() and alert but it

Getting Downloads Folder in C#? [duplicate]

I have made some code that will search directories and display files in a listbox. DirectoryInfo dinfo2 = new DirectoryInfo(@"C:\Users\Hunte

How to find a point where a line intersects an ellipse in 2D (C#)

I need to find a point where a line (its origin is ellipse' center) intersects an ellipse in 2D... I can easily find a point on a circle, because I know an angl

Auto expand hierarchical data rows in Xamdatarrid

I have a Xamdatagrid having hierarchical data.I want to display all such records expended automatically.So that user doesn't have to click on + icon for each re

Fill a ListView from Postgres Database in WPF C#

I'm using WPF C# Visual Studio 2012. I have a Listview in my xaml like: <ListView Name="listview" Grid.Column="0" Grid.ColumnSp

Regex expression for parsing SQL Server schema and tablename

I am trying to parse schema and table name using a regular expression. I am using C# (.NET Core) and System.Text.RegularExpressions. Here are examples how the

The Console application has exited with code 0 (0x0) although unhandled exception occured

I'm writing very simple code of .Net Framework (4.7) Console Application and intentionally throw unhanded exception. But still the program exit with code 0 (0x0

Get Dictionary value in IQueryable LINQ to Entities query

I have to support multiple languages in production application. There are lot of Entity Framework queries that gets data from database as deferred IQueryable l

HttpContext.User.Identity.IsAuthenticated throws System.NullReferenceException: Object reference not set to an instance of an object

My code is simple like : [HttpGet] public ActionResult Login () { if (User.Identity.IsAuthenticated) { return RedirectToAction("Index", "Home");

how to overload postfix and prefix operator in c# [duplicate]

How do we implement the overload for postfix and prefix operators in c# void Main() { MyClass myclass=new MyClass(); myclass.x=5;

CSS, Images, JS not loading in IIS

My all applications were working fine but suddenly all sites under IIS are not loading css, images, scripts. It redirect to login page. If i login it works fi

Parallelizing multiple long-running tasks with async/await

I have a helper method returns IEnumerable<string>. As the collection grows, it's slowing down dramatically. My current approach is to do essentially the

Override TextChanged event for a custom control not working

I tried this code in my custom user control in a C# Windows application: public partial class HtextBox : DevExpress.XtraEditors.TextEdit { protected overri

Save as pdf using ClosedXML

Does ClosedXML have any function that can be used to save an excel file as PDF? Currently i am using ClosedXML to create and populate the excel file and then u

Consuming web service with SSL (https) in C#

I want to consume an ssl secured web service in C#. The request looks like this: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelop

MAUI Blazor Android Sql Connection

I am experimenting with Maui Blazor. I want to connect my application with an SQL server database. Therefore I used a simple Sql Connection String. When I test

How to strip namespaces from Xml Document

I am having some trouble with removing namespaces from a document in order for a proprietary Parse() function to work properly. I am receiving an XML string tha

IDbAsyncEnumerable not implemented

I am trying to make a FakeDbContext with a FakeDbSet for unit testing. But I get the following error (see below). I am extending DbSet so normally IDbAsyncEnum