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…
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…
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…
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…
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…
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…
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…
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…
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,…
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 =…
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.
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…
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…
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…
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"…
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:
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…
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…
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…
Is C # an interpreted language?
C # is an interpreted language, therefore slower than C or C ++. Why use C Sharp?