11,744 questions with Developer technologies | C# tags

Sort by: Updated
5 answers

Issue to scan the file

Hi, It is not scanning all of the lines of the file using the codes below on VS 2026. Anything wrong? try { string[] fileEntries = Directory.GetFiles(directoryPath); foreach (string fileName in fileEntries) …

Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,744 questions
asked 2026-01-10T07:57:47.4233333+00:00
Peter_1985 3,026 Reputation points
commented 2026-01-20T16:56:45.7566667+00:00
AgaveJoe 30,571 Reputation points
2 answers

About a rare issue in a WPF‑based login screen where the Enter key appears to be continuously pressed

I am creating a login screen for an application using WPF. The login screen contains text boxes for entering a login ID and password. When the Enter key is pressed while there is input in either the login ID or password text box, the login button is…

Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,744 questions
asked 2026-01-16T05:33:18.6666667+00:00
nqyuta 80 Reputation points
commented 2026-01-20T12:19:48.1966667+00:00
Susmitha T (INFOSYS LIMITED) 2,285 Reputation points Microsoft External Staff
1 answer

CollectionView display messages backwards

I'm trying to create a replicate of WhatsApp in .NET 10 MAUI. I have the list of messages: the newest one at the bottom of the list and the old at the top. For this implementation, I use a…

Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,744 questions
asked 2026-01-20T10:05:29.63+00:00
Enrico Rossini 236 Reputation points
answered 2026-01-20T10:17:36.3566667+00:00
Gade Harika (INFOSYS LIMITED) 2,415 Reputation points Microsoft External Staff
1 answer

How do I get the bins from a purchase order line item from the Business Central APIs?

I have a C# app that calls Business Central APIs. I can use https://api.businesscentral.dynamics.com/v2.0/{{tenantId}}/Sandbox/api/v2.0/companies({{company_id}})/purchaseOrders({{PO}})/purchaseOrderLines?$expand=location to get more data about the…

Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,744 questions
asked 2025-12-04T21:24:59.9433333+00:00
Trevor Leon 25 Reputation points
commented 2026-01-20T09:32:14.2333333+00:00
Harry Vo (WICLOUD CORPORATION) 4,665 Reputation points Microsoft External Staff Moderator
0 answers

Flex Consumption Option Set binding not working

In this instance its causing issues where our Service Bus Triggers are no longer being hit. Removing the __ reference and referencing an app setting that does not have a prefix works fine. [Function(nameof(ProcessInputtedMessage))] public async…

Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,744 questions
asked 2025-05-20T10:55:41.2+00:00
Josh Grew 0 Reputation points
commented 2026-01-20T09:30:18.07+00:00
Harry Vo (WICLOUD CORPORATION) 4,665 Reputation points Microsoft External Staff Moderator
2 answers One of the answers was accepted by the question author.

Visual Studio 2022 Git: Cannot fetch from remote repository (Git Bash works fine), How to fix this?

I am experiencing an issue where Visual Studio 2022 cannot fetch from a Git remote repository, but Git Bash works correctly using the same repository and credentials. Visual Studio shows: Failed to fetch from the remote repository. See the Output window…

Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,744 questions
asked 2026-01-20T06:30:52.7966667+00:00
Thejaswini L 20 Reputation points
answered 2026-01-20T07:34:06.26+00:00
Adiba Khan 1,840 Reputation points Microsoft External Staff
1 answer One of the answers was accepted by the question author.

Issue to show the error

Hi, For the code like the project below https://1drv.ms/u/c/17ec75244bac022f/IQDe24zzJVnTS65tU-RbGuKoAaMtx1mPtvJWgmXlcYO-HdE?e=8NpGwO is not able to show the error for this file. Any…

Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,744 questions
asked 2026-01-12T03:24:30.1466667+00:00
Peter_1985 3,026 Reputation points
commented 2026-01-19T11:38:47.9133333+00:00
Surya Amrutha Vaishnavi Lanka (INFOSYS LIMITED) 1,725 Reputation points Microsoft External Staff
2 answers

How to generate PDF with Multilevel list with hierarchical numbering in C# application

Hi, I am new to C#, I am creating a small application, and I need to generate some PDF reports from C# application programmatically. Most of the reports will be Word-like multilevel lists with hierarchical numbering (these numbers have to be calculated…

Developer technologies | .NET | Other
Developer technologies | .NET | Other
Microsoft Technologies based on the .NET software framework. Miscellaneous topics that do not fit into specific categories.
4,154 questions
Developer technologies | ASP.NET | Other
Developer technologies | ASP.NET | Other
A set of technologies in .NET for building web applications and web services. Miscellaneous topics that do not fit into specific categories.
3,643 questions
Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,744 questions
asked 2022-03-15T23:20:55.49+00:00
Peter The Batman 1 Reputation point
answered 2026-01-17T05:51:40.6266667+00:00
Anna Tarta 0 Reputation points
6 answers

Recommend a free PDF developer's library for C#

I'm using VS 2017 CE, C#, and WinForms on a non-commercial application that adds and deletes pages from PDFs. The added pages are created with minimal text and no drawing or graphics. I've been using iText7, and it's great, but it has far more power…

Developer technologies | Windows Forms
Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,744 questions
asked 2020-12-25T19:45:22.387+00:00
Anonymous
answered 2026-01-17T05:50:08.5766667+00:00
Anna Tarta 0 Reputation points
3 answers

Can anyone recomend the easiest tool to generate pdfs in c#?

I am trying to generate a PDF from C# Library for my project. Any tools you guys can suggest would be great, either Free or Paid. I am open to any options. Thank you!

Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,744 questions
asked 2022-03-08T08:09:05.887+00:00
Anonymous
commented 2026-01-17T05:12:20.16+00:00
Anna Tarta 0 Reputation points
2 answers

GisConverter -ORG Format Double Conversion

Current: We used GIS Converter to our "CDR" system, which detects viruses. We have already implemented the ORG Format . ORG Format - convert from the source format to itself. Problem: When we convert from source format to target format and…

Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,744 questions
asked 2026-01-09T10:29:53.3666667+00:00
Dani_S 5,581 Reputation points
commented 2026-01-16T11:13:15.29+00:00
Dani_S 5,581 Reputation points
2 answers

Cannot view forms in design mode after rebuilding the project

ERROR: Designer load encountered an error. Please ensure that the project can be built successfully. Tried ---> Built , Clean, rebuild Result -> Still cannot view the form in design mode. Plus, already rebuilt this prokect today ... #annoyed ! …

Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,744 questions
asked 2026-01-07T11:54:21.7833333+00:00
Pieter Claassens 40 Reputation points
commented 2026-01-16T03:10:00.38+00:00
Gade Harika (INFOSYS LIMITED) 2,415 Reputation points Microsoft External Staff
3 answers

Refused to apply style from <URL> because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled

HI Team, I'm trying to to bundling CSS files after minification. My application is ASP.net Core 4.5 not MVC. I have created bungleconfig class file and written below code public class bundleconfig { // For more information on bundling, visit…

Developer technologies | ASP.NET | Other
Developer technologies | ASP.NET | Other
A set of technologies in .NET for building web applications and web services. Miscellaneous topics that do not fit into specific categories.
3,643 questions
Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,744 questions
asked 2021-05-13T06:24:58.623+00:00
Avbl Sundari 1 Reputation point
edited an answer 2026-01-15T14:26:02.46+00:00
Madhu 0 Reputation points
1 answer

LINQ returns System.Data.SqlTypes.SqlNullValueException. Why?

I'm learning LINQ, and trying to fetch data from a SQL Server database. All I'm trying to do is fetch data from one datetime field that is defined as nullable, where I know the field value is set to null. Here's my statement: var query = from cm in…

Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,744 questions
asked 2026-01-14T20:25:52.73+00:00
Corey Fleig 265 Reputation points
edited an answer 2026-01-15T06:32:40.3966667+00:00
Michael Le (WICLOUD CORPORATION) 10,475 Reputation points Microsoft External Staff Moderator
1 answer

Why am I getting System.Data.SqlTypes.SqlNullValueException?

I have a model (this code is greatly reduced): public class myClass { public DateTime? MyDate {get; set;} } and I have a database table with: create table myTable (somedate datetime null); insert into myTable select null; and I have a linq…

Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,744 questions
asked 2026-01-14T01:04:58.32+00:00
Corey Fleig 265 Reputation points
accepted 2026-01-15T00:06:39.59+00:00
Corey Fleig 265 Reputation points
1 answer

StoreContext.GetAppLicenseAsync() returns false for active subscription in MSIX CLI

I'm building a WinRT CLI wrapper in C# that checks if a user owns an active Microsoft Store subscription add-on. This CLI is called from an Electron + React.js app using command-line arguments and returns true or false depending on the license…

Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,744 questions
asked 2025-06-12T16:21:17.58+00:00
M McKanstry 0 Reputation points
edited a comment 2026-01-14T20:16:41.0166667+00:00
Nathan 0 Reputation points
2 answers

GetDirectoryName('')" cannot be evaluated. The path is not of a legal form.

Good day, trying to compile my Windows Forms app - getting the error in the subject field... Thx

Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,744 questions
asked 2026-01-07T07:56:12.91+00:00
Pieter Claassens 40 Reputation points
commented 2026-01-14T12:59:44.11+00:00
Varsha Dundigalla(INFOSYS LIMITED) 4,420 Reputation points Microsoft External Staff
4 answers

How to secure both Blazer server and api ?

Hello, I need an advice. I'd like to secure a blazor server app with individual user account. This functionality is embedded with the basic setup, and use cookies. But I also need to protect my web api with the same way. I know about the JWT, but I…

Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,744 questions
asked 2026-01-07T10:13:29.1533333+00:00
Laurent Guigon 331 Reputation points
commented 2026-01-14T12:59:03.22+00:00
Varsha Dundigalla(INFOSYS LIMITED) 4,420 Reputation points Microsoft External Staff
3 answers One of the answers was accepted by the question author.

C# Winforms control.Width not reflecting FontStyle change from Regular to Bold at runtime

I am (trying to) use control.Width at runtime to calculate control spacing . To test I've got this code: `public static Font Std_9_R { get; } = new Font( "Segoe UI", 9, FontStyle.Regular );` ```` public static Font Std_9_B { get; }…

Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,744 questions
asked 2026-01-13T12:20:37.4233333+00:00
Art Hansen 601 Reputation points
commented 2026-01-14T12:56:32.9333333+00:00
Varsha Dundigalla(INFOSYS LIMITED) 4,420 Reputation points Microsoft External Staff
1 answer One of the answers was accepted by the question author.

VS2022 c# File.Copy weird behaviour after upgrade to Office 365

We have a small windows desktop app (.NET 4.8) that creates a copy of some data it grabs from and ODBC connection and stores it in an MS Access database which in connects to via oledb. This has been working perfectly well for a long time. We have a…

Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,744 questions
asked 2026-01-12T18:13:53.1933333+00:00
Gegg-8342 21 Reputation points
commented 2026-01-14T02:07:40.5966667+00:00
Michael Le (WICLOUD CORPORATION) 10,475 Reputation points Microsoft External Staff Moderator