10,858 questions with C#-related tags

Sort by: Updated
2 answers

What is the easiest way to manage JSON data in C#?

Thank you for this very helpful forum. I have this API request that is a GET request and it returns a massive JSON text. So, what is the easiest way to make the JSON file properly formatted and usable? This is what the code looks like, by the way, that…

C#
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.
10,858 questions
asked 2024-09-09T23:38:10.44+00:00
William Thompson 120 Reputation points
commented 2024-09-18T06:48:33.3+00:00
Jiale Xue - MSFT 44,751 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

Disable Control Render

In WPF I have a control to load titles but the control is very slow to render on screen. I have been told that I can use BeginInit() of the control to add the items and not render them. How do I use it if the control has already been initialized and is…

C#
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.
10,858 questions
asked 2024-09-18T03:34:27.8866667+00:00
zequion 401 Reputation points
accepted 2024-09-18T06:37:49.7733333+00:00
zequion 401 Reputation points
2 answers One of the answers was accepted by the question author.

How to connect to Azure Service Bus through Private Endpoint?

I'm developing an application in our organization using C#/.NET(8.0) and have to use Azure Service Bus. My access in our organization's Azure account is mostly read-only, so I don't know actually how they created the instances. But I can see that the…

Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
616 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,808 questions
C#
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.
10,858 questions
asked 2024-03-06T01:47:21.7933333+00:00
Bergs 60 Reputation points
accepted 2024-09-18T06:04:33.25+00:00
Bergs 60 Reputation points
2 answers

What is the proper way to declare a Microsoft class to use in my code.

What is the proper way to declare a Microsoft class to use in my code. The quick and dirty way I am doing it here, I know, is not correct Microsoft SharePoint.Client.List newList = null; I think it is something like…

C#
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.
10,858 questions
asked 2024-09-17T20:57:02.1+00:00
William Thompson 120 Reputation points
answered 2024-09-18T05:44:06.48+00:00
Jiachen Li-MSFT 31,011 Reputation points Microsoft Vendor
1 answer

SuspendLayout to Form and Control

In WPF I have a task that executes a function that loads about 150 titles into a DevExpress NavBar control and a ComboBox. The function takes a long time to finish and it seems that it is because the NavNar control takes a long time to render all the…

C#
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.
10,858 questions
asked 2024-09-17T03:43:58.9466667+00:00
zequion 401 Reputation points
edited a comment 2024-09-18T03:27:51.41+00:00
Hui Liu-MSFT 48,506 Reputation points Microsoft Vendor
2 answers

How can I create a clean project folder structure?

Hello I use many libraries that I downloaded from Nugget in a wpf c# project. These libraries are normally located under the "Bin" folder. I want to create a cleaner folder structure. For this, I want to collect these libraries under a folder…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,762 questions
C#
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.
10,858 questions
asked 2024-09-11T07:10:33.9366667+00:00
fatih uyanık 80 Reputation points
commented 2024-09-18T01:14:17.6433333+00:00
Hongrui Yu-MSFT 1,605 Reputation points Microsoft Vendor
3 answers One of the answers was accepted by the question author.

Is it possible to disable the new "top-level-statements" compiler configuration, which obfuscates and makes the language less transparent?

It makes no sense to have top-level statements - it would have been better to have the console app auto-generate the boiler-plate console app with a Main() method, the same way a boilerplate HTML file can be created quickly. The language was consistent…

C#
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.
10,858 questions
asked 2024-09-17T13:35:30.63+00:00
Jim Copeland 20 Reputation points
commented 2024-09-17T21:57:35.6433333+00:00
Bruce (SqlWork.com) 64,486 Reputation points
2 answers

Using IDENTITY_INSERT with FK_ChildTable_ParentTable?

Hello, Wrapping SaveChanges with ON and OFF works fine with individual tables. But not in case of a parent-child relationship where a foreign key exists. Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot insert explicit value for identity column…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
736 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,526 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,690 questions
C#
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.
10,858 questions
asked 2024-09-16T22:33:43.8366667+00:00
Joyce 80 Reputation points
answered 2024-09-17T21:20:25.1766667+00:00
Erland Sommarskog 110.4K Reputation points MVP
0 answers

How to set PerMonitor DpiAwareness for .NET 8 Windows desktop application in WPF?

Hi, I am having problem setting WPF window based desktop .NET 8 application to work as PerMonitor DpiAware. System default automatic scaling schema... When user changes Windows 10 display setting scale, WPF-Window is being scaled accordingly. Also,…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,762 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,592 questions
C#
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.
10,858 questions
asked 2024-09-03T11:03:57.19+00:00
MERUN KUMAR MAITY 576 Reputation points
commented 2024-09-17T13:05:45.7+00:00
MERUN KUMAR MAITY 576 Reputation points
4 answers

How to invalidate .AspNet.ApplicationCookie Cookie in ASP.NET MVC 4.6.2

Hi Sir/Madam I have web application using ASP.NET MVC 4.6 version. In Startup, I am creating ApplicaitonCookie like below app.UseCookieAuthentication(new CookieAuthenticationOptions { AuthenticationType = "ApplicationCookie", ExpireTimeSpan =…

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,459 questions
C#
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.
10,858 questions
asked 2024-09-16T07:36:43.33+00:00
Srinivas Balanagu 0 Reputation points
edited an answer 2024-09-17T09:04:29.93+00:00
XuDong Peng-MSFT 10,511 Reputation points Microsoft Vendor
2 answers

The sizeof operator doesn't work on Int128 - C#

Hello, What are the differences between Int128 and other Int groups such as Int16, Int32, and Int64? The sizeof operator doesn't work on Int128.

C#
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.
10,858 questions
asked 2024-08-26T11:09:34.5333333+00:00
Shervan360 1,541 Reputation points
answered 2024-09-17T08:27:31.9933333+00:00
Jiachen Li-MSFT 31,011 Reputation points Microsoft Vendor
1 answer

We want to migrate our build to MSBUILD, instead of using CSC and Link in our script.

Please let us know how we can achieve the build using the MSBUILD instead of the calling the CSC and LINK. We have a C# project file which contain all the files it required to build the application. But we have a dependency with a 3rd party .obj and .lib…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,059 questions
C#
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.
10,858 questions
asked 2024-09-12T18:01:59.13+00:00
67883078 41 Reputation points
commented 2024-09-17T08:16:59.71+00:00
67883078 41 Reputation points
1 answer

UWP Windows.System.Launcher.LaunchUriAsync is not opening correctly in browser when the URI supports opening the link in other uwp app and browser.

Hi I'm using Windows.System.Launcher.LaunchUriAsync to open a URI, I'm prompted with a dialogue when the URI can be opened in other uwp app and browser. If chosen browser, it opens the local path - AppData/Local/Microsoft/Windows/INetCache instead of…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,808 questions
Universal Windows Platform (UWP)
C#
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.
10,858 questions
XAML
XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
805 questions
asked 2024-09-16T05:48:47.1033333+00:00
Harsini 0 Reputation points
answered 2024-09-17T02:23:38.9433333+00:00
Roy Li - MSFT 33,001 Reputation points Microsoft Vendor
0 answers

unable to upgrade my subscription azure says 'You are not eligible for upgrade of your Azure account'

I recently migrated my database and .NET Core API application to Azure. They gave me $200 in free credits, but all of a sudden, my application stopped working. When I checked, I received an email asking me to upgrade my subscription. However, when I try…

C#
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.
10,858 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
38,800 questions
asked 2024-09-14T14:57:25.59+00:00
maria shar 0 Reputation points
edited the question 2024-09-16T13:43:55.99+00:00
ajkuma 25,791 Reputation points Microsoft Employee
3 answers

In a UWP application using WebView2, the CoreWebView2 method returns null after changing the region at runtime in C#

The CoreWebView2 method works fine the first time, but after changing the app region, the CoreWebView2 method returns null after initialization. Please help to fix this issue. Code: XAML <muxc:WebView2 x:Name="PDFViewer"…

Universal Windows Platform (UWP)
C#
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.
10,858 questions
asked 2024-09-03T12:56:53.57+00:00
Jay 60 Reputation points
answered 2024-09-16T06:54:26.4933333+00:00
Jay 60 Reputation points
3 answers

how update WebView2 control in C# WPF application as per Color Theme selected in visual studio 2022 like Light, Dark etc

how update WebView2 control in C# WPF application as per Color Theme selected in visual studio 2022. Color theme can be changed in visual studio 2022 from Tools -> Options -> Color Theme:

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,762 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,059 questions
C#
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.
10,858 questions
asked 2024-08-19T17:46:32.5333333+00:00
Ajay Gera 20 Reputation points
commented 2024-09-16T05:54:58.0866667+00:00
Hongrui Yu-MSFT 1,605 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

How do I access DWriteCore from a C# managed application?

How do I access DWriteCore from a C# managed application? I'm using .Net5 WindowsAppSDK Desktop. I need to get a SYSTEM and CUSTOM FONT COLLECTION LIST using DWriteCore, but I need to do so from a C# App using WindowsAppSDK, which says it includes…

Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
780 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,592 questions
C#
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.
10,858 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,153 questions
asked 2021-10-02T06:36:10.877+00:00
Kenny Brown 51 Reputation points
commented 2024-09-15T16:49:43.5366667+00:00
Castorix31 84,546 Reputation points
2 answers

Custom fonts not working when uploading Maui Android project to Play Store

I have added custom fonts in the font directory of my Maui project's Resources directory and updated the MauiProgram.cs file accordingly. The fonts work fine when I deploy the application using Visual Studio, but when I publish the app and upload it to…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,424 questions
C#
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.
10,858 questions
asked 2024-05-21T16:58:13.6333333+00:00
Mujtaba Ali Panjwani 15 Reputation points
edited an answer 2024-09-15T15:02:36.46+00:00
Dave 0 Reputation points
1 answer

Is it possible to use the Google_Translate Api Key without a billing account?

Is it possible to use the Google_Translate Api Key without a billing account? I created an ApiKey in the cloud.google.com. I'm trying to activate ApiKey cloud.google.com I get the message: "Cloud Translation API requires a project with a…

C#
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.
10,858 questions
asked 2024-09-14T14:07:57.5266667+00:00
Ivanov Ivan 26 Reputation points
edited an answer 2024-09-15T11:29:53.5033333+00:00
Castorix31 84,546 Reputation points
6 answers One of the answers was accepted by the question author.

Is C # an interpreted language?

C # is an interpreted language, therefore slower than C or C ++. Why use C Sharp?

C#
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.
10,858 questions
asked 2021-08-24T06:24:37.307+00:00
Sergio23 271 Reputation points
edited a comment 2024-09-15T01:54:31.24+00:00
Ivan Thomson 0 Reputation points