How to return from async Task method?
My method is async Task like following. public async Task MyMethod() { string[] lists = GetCustomerLists(); foreach (string lst in lists) { // do somethong // if meet some condition to return ???? } } What is the…
Why in winforms, after form resize does 'screen.getworkingarea( this) .height' return the same value
Attempting to draw a grid on a winforms form. Draws ok. If I resize the form at all the screen.getworkingarea returns the original values and redraws the grid to the same size with the resized section blank. Having stepped through the code I can see…
Count odd and even number in single textbox in c#
As you can see the image above, they have random [02 04 01 03 05] numbers. Now if I click the button count it will count how many even number or odd number in textbox. I have a code but it not working properly. private void button2_Click(object sender,…
How can I determine which endpoint caused the health check to fail and what error message is being thrown by the endpoint?
How can I determine which endpoint caused the health check to fail and what error message is being thrown by the endpoint?
How to obtain access to 'HumanPresenceSettings. SetingsChanged'
The "HumanPresenceSettings" instance I returned through this method, 'humanPresenceSettings=await HumanPresenceSettings. GetCurrentSettings Asynchronous ()', can read the relevant settings. However, when I subscribe to 'HumanPresenceSettings.…

AppInstallManager error - UWP
Hello Hello. I have a sample UWP and the following code is getting error: private async void Button_ClickAsync(object sender, RoutedEventArgs e) { AppInstallManager appInstallManager = new AppInstallManager(); } WinUI works well.

Linq ThenInclude Where Problem
Hello, I am trying to get only IsActive=1 data with this Linq; _db.Orders.Include(d => d.OrderDetails).ThenInclude(v => v.Vendor).Where(o=> o.OrderDetails.Any(od => od.IsActive == 1)).ToListAsync(); But the query brings all the…

Another instance of an entity raises an error when update
In my ASP.NET Core 9 Web API and Entity Framework Core, I have a model class for a Client that has a relationship many to many with the model class Channel. public class Client { [Key] public long ID { get; set; } } public class Channel { …

How is it possible to implement a complete semblance of a console (online compiler) in win fomrs?
Good time! Faced such a task as implementing code execution as in a console application in C # (with classes, methods, the ability to read data, etc.). Everything went super until I started testing my application. The problem is that I can execute code…
How to Detect Stylus Pen Sides (Pen Tip vs. Eraser) in WPF (C#)
Hello, I’m developing a WPF application in C# that interacts with a stylus pen on a Windows device. I need to detect which side of the stylus is being used—whether it’s the pen tip or the eraser side. Could someone guide me on how to achieve this…
Visual Studio for Linux?
Since Microsoft & .NET Team is pushing so hard in the cross-platform solutions, will the Linux community see Visual Studio run on Linux? Since it is a great IDE with amazing tools, some of us are wondering will we see it on our preferred OS? I'm in…
Microsoft.Data.SQLClient 5.2.0 fails to work with .Net 8
I am having issues creating a Class library with C# and .net 8 that uses Microsoft.Data.SQLClient. version 5.2.0 which states that it will run on .net 8 platform. Here is the code for the class library using System.Data; using…
How to fix the problem of controls disappearing from the screen design window.
I am using Visual Studio Community 2022 version. In the C# WinForm framework environment, when changing the position or size of the screen design window control, an error occurs where the control disappears. In that case, if I close and open the Form…
How to open notepad on remote computer
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Diagnostics; using…
Closed XML.Reports Function app file not saving
I'm trying to write a function app which generates a report using ClosedXML.Reports. The output template is quite simple and only uses the summaryabove template. The function app is able to create a text file and save it to blob storage successfully. But…

My Create a bot template is not completeing
I'm trying to deploy a bot using the 'Create a bot' from Language Studio. I've followed all the instructions and it is just hanging. I've just upgraded to developer support is this it?
I'm searching for a package that can detect the country of a contact number without Knowing the country code or default region, while also being cost-effective in c#
I'm searching for a package that can detect the country of a contact number without Knowing the country code or default region, while also being cost-effective in c#
How to fix an OpenXml issue in Word interop (C#) concerning bullet lists
Here is a truncated OpenXml standalone package xml => it's a string returned by range.WordOpenXml that can be processed by the OpenXml SDK WordprocessingDocument.FromFlatOpcString. Below is a very simple bullet list (the xml has been truncated to…
Converting audio/video tracks to AAC format in C# app.
I try convert audio/video tracks to AAC format using qaac lib. In CMD it works and output information about progress of convertation. In my C# app it works too, but I can't get information about progress, i try use these events: OutputDataReceived,…

Problem with SqlParameterCollection.Add method to make SqlDbType all NVarChar
I am trying to access a SQL Server table with a program created in C# to update and register data. I am thinking of parameterizing the query and using the SqlParameterCollection.Add method to create a SQL statement. In this case, if I set SqlDbtype to…