11,770 questions with Developer technologies | C# tags

Sort by: Updated
2 answers One of the answers was accepted by the question author.

How to Send email using Micorsoft Graph API & OAuth2 in C#

Requirements 1)     Our company needs to send notification emails to customers using MS Exchange mail service.  The task needs to be automated using a c# program in Azure or from local machine. 2)     Use share mailbox to save on license cost. It will be…

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,770 questions
asked 2026-01-28T16:16:11.0433333+00:00
Yifang Yang 40 Reputation points
accepted 2026-02-10T13:34:27.18+00:00
Yifang Yang 40 Reputation points
1 answer

C# SerialPort.Open hangs up for a long time when the serial port is not in correct status

Hello, I have a WPF application on Win10 which will select and open a serial port. I already know the serial port is in a status which can be listed but can not communicate normally. I try to open it use SerialPort.Open(), but the thread will just hang…

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,770 questions
asked 2026-02-10T07:26:52.27+00:00
Li Chu 0 Reputation points
answered 2026-02-10T10:42:51.6333333+00:00
Varsha Dundigalla(INFOSYS LIMITED) 4,590 Reputation points Microsoft External Staff
2 answers

Microsoft.CodeAnalysis.NetAnalyzers not doing anything at all

So I switched from using the fxcop nuget to the new Microsoft.CodeAnalysis.NetAnalyzers NuGet and it does nothing at all. I added the following to my csproj file expecting it to apply all rules but nothing happens when i build. I uploaded an example…

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,770 questions
asked 2021-02-03T21:07:29.353+00:00
Endasil 31 Reputation points
answered 2026-02-10T08:47:18.11+00:00
OK_MF 20 Reputation points
2 answers

How to automatically redirect to next page after progress bar finish loading

How can I create a progress bar that will be loading, and after it finishes loading, it will automatically redirect to next page after 10 seconds? Here is what I tried, although what I've been able to get is a button such that when the button is clicked,…

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,770 questions
asked 2025-12-03T18:17:55.22+00:00
Donald Symmons 3,096 Reputation points
recommended 2026-02-10T08:17:43.8533333+00:00
Alexandra Tanasescu 0 Reputation points Moderator
2 answers

What is Best Practice for Passing a complex viewmodel from a View to the controller?

I have a view form with a complex VM, and it allows the end user to see dozens of data items in various text boxes (as many as 40). At some point, the user will want to update one or more of the textbox data points, so when the model is modified in 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,770 questions
asked 2026-02-04T20:01:17.99+00:00
Corey Fleig 350 Reputation points
commented 2026-02-10T08:09:13.55+00:00
Surya Amrutha Vaishnavi Lanka (INFOSYS LIMITED) 1,725 Reputation points Microsoft External Staff
1 answer

Issue to show the error

Hi, For the code like is not able to show the error for the file. Any issue?

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,770 questions
asked 2026-01-12T03:24:30.1466667+00:00
Peter_1985 3,071 Reputation points
edited the question 2026-02-10T08:02:24.6633333+00:00
Peter_1985 3,071 Reputation points
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,770 questions
asked 2026-01-10T07:57:47.4233333+00:00
Peter_1985 3,071 Reputation points
edited a comment 2026-02-10T07:58:02.47+00:00
Peter_1985 3,071 Reputation points
2 answers

Why the class library has different supports for framework and .NET?

Hi, I looked on evolution of class library. It used for reused. As I see the class library has different supports for Framework and .NET. Can you please explain it in more details , what are the option and what is roadmap for future ? Every NuGet…

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,770 questions
asked 2026-02-06T07:31:05.0866667+00:00
Y. Yakir 70 Reputation points
commented 2026-02-10T07:48:47.6833333+00:00
Gade Harika (INFOSYS LIMITED) 2,420 Reputation points Microsoft External Staff
1 answer

Change the app icon based on the light/dark mode

In a .NET 9 MAUI application, I would like to change the app icon based on light or dark mode, based on the system. The icon of the application is an SVG image with a transparent background. Is there any example of documentation how to implement it?

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,770 questions
asked 2025-08-20T06:15:40.3066667+00:00
Enrico Rossini 236 Reputation points
commented 2026-02-10T07:36:41.99+00:00
Gade Harika (INFOSYS LIMITED) 2,420 Reputation points Microsoft External Staff
1 answer

Bug -Move SharpCompress from 0.42.0 to 0.44.5 failed

Hi, I'm using Console App in .NET 10 reference to class library :netstandard2.1 as follow: <Project Sdk="Microsoft.NET.Sdk"> **<PropertyGroup>** **<TargetFramework>netstandard2.1</TargetFramework>** Before: After:…

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,770 questions
asked 2026-02-03T14:22:27.25+00:00
Y. Yakir 70 Reputation points
commented 2026-02-09T07:06:19.02+00:00
Jack Dang (WICLOUD CORPORATION) 11,065 Reputation points Microsoft External Staff Moderator
4 answers

what is the best practice to change the element of IEnuerable?

I have IEnumerable<XY> and how to change all the elements in it? class XY { public int X{get;set;} public int Y{get;set;} } what I want is to adding 1 of the X I have to change it to array ? var arr=xys.ToArray(); for(int…

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,770 questions
asked 2026-02-08T09:34:15.7633333+00:00
mc 6,701 Reputation points
answered 2026-02-09T04:02:32.35+00:00
Jack Dang (WICLOUD CORPORATION) 11,065 Reputation points Microsoft External Staff Moderator
1 answer One of the answers was accepted by the question author.

MemoryStream issue

Hi, Any better way to add the following to this?

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,770 questions
asked 2026-01-28T06:52:52.33+00:00
Peter_1985 3,071 Reputation points
accepted 2026-02-09T03:03:54.3366667+00:00
Peter_1985 3,071 Reputation points
2 answers

What are the differences between GeoJson, ndjson, topojson, jsonl, GeoJsonSeq ?

Hi, GeoJson, ndjson, topojson, jsonl, GeoJsonSeq they are all json but have different structure! 1.Can you please give for each extension a C# function code to check it ? 2.Can you please give a sample data for each format: simple and complex…

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,770 questions
asked 2026-02-07T07:54:54.4266667+00:00
Y. Yakir 70 Reputation points
edited a comment 2026-02-08T09:40:07.6033333+00:00
Y. Yakir 70 Reputation points
3 answers One of the answers was accepted by the question author.

How to detect .ndJson

Hi, NDJSON (usually written as .ndjson) stands for Newline-Delimited JSON. instead of one big JSON array, you have one JSON object per line. How to detect .ndJson file ? This my code. Thanks in advance,

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,770 questions
asked 2026-02-05T20:52:09.8033333+00:00
Y. Yakir 70 Reputation points
accepted 2026-02-08T08:10:23.7033333+00:00
Y. Yakir 70 Reputation points
1 answer

Which files to add for a .msix pacakger i need it in unity game packaged

I have HYPERNOVABACKROOMSs.exe is data folder needed and by the way my cooperation name is called NORVEX TECHNOLOGY GROUP but msix packager doesnt allow spaces can you please support me and msix packager says no folders what to do? and appxmanifest…

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,770 questions
asked 2026-02-06T12:10:10.5633333+00:00
OMER SEYHAN 0 Reputation points
answered 2026-02-06T12:11:32.0633333+00:00
OMER SEYHAN 0 Reputation points
1 answer

Sample for SOLID EDGE, AutoCAD, Katya to convert to STEP.

Hi, Regarding your suggestion, I found a third-party CAD kernel or SDK vendor. Where I can find samples for as input file to convert to STEP(STEP as in the universal file format) from: SOLID EDGE AutoCAD Katya Thanks in advance,

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,770 questions
asked 2026-02-06T07:03:26.0133333+00:00
Y. Yakir 70 Reputation points
commented 2026-02-06T11:53:37.0866667+00:00
Y. Yakir 70 Reputation points
3 answers

Issue of Swagger, Postman

Hi, Further to https://learn.microsoft.com/en-us/answers/questions/5750852/issue-to-the-deployed-app How to check and ensure Swagger, Postman is functioning well? On the client, how to trigger that Swagger, Postman of the server?

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,770 questions
asked 2026-02-03T04:28:19.02+00:00
Jonathan 60 Reputation points
commented 2026-02-06T09:22:40.76+00:00
Jack Dang (WICLOUD CORPORATION) 11,065 Reputation points Microsoft External Staff Moderator
1 answer One of the answers was accepted by the question author.

STEP as in the universal file format

Hi, I'm exploring STEP as in the universal file format. I want to build Console App in .NET 10 on Windows , that convert from different CAD/CAM/CAE software for to STEP. What Microsoft or or other Tools can advise? Thanks in advance, This what Chat GPT…

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,770 questions
asked 2026-02-03T06:56:07.43+00:00
Y. Yakir 70 Reputation points
commented 2026-02-06T03:48:33.5+00:00
Jack Dang (WICLOUD CORPORATION) 11,065 Reputation points Microsoft External Staff Moderator
1 answer One of the answers was accepted by the question author.

Could not load file or assembly ‘Microsoft.Data.Sqlite, Version=9.0.6.0 in .NET 10

Hi,   I have Console App I .NET 10 that reference to netstandard2.1:   This is the csproj: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType>…

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,770 questions
asked 2026-02-01T12:21:44.1633333+00:00
Y. Yakir 70 Reputation points
commented 2026-02-05T15:20:28.4233333+00:00
Y. Yakir 70 Reputation points
4 answers One of the answers was accepted by the question author.

OpenAPI issue

Hi, Can you help it below? How to fix it? Originally I was with this error "The type or namespace name 'OpenApi' does not exist in the namespace 'Microsoft.AspNetCore' (are you missing an assembly reference?)"

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,770 questions
asked 2026-02-03T14:23:41.73+00:00
Jonathan 60 Reputation points
accepted 2026-02-05T02:12:14.68+00:00
Jonathan 60 Reputation points