Inserting TextAnnotation in graph c#
I creating simple graph with line as average (sample only), I have a code in HorizontalLineAnnotation (color red line) and TextAnnotation but the problem is that, the TextAnnotation not working properly. Here my code in HorizontalLineAnnotation and…
Code to split x³
I got help from the for to split exponents , but the below code won't split x³ I want output as x and 3 using System; using System.Text; using System.Text.RegularExpressions; string input = "2³"; Regex regex = new…
Are ESim related WinRT APIs require Package Identity?
Hi, team I am trying to use WinRT API (under name space Windows.Networking.NetworkOperators) to read ESim ID on my laptop. I created a UWP App and this api worked. However the project i'm working on is not a UWP app and it's based on .NET 4.6. I imported…
Datagridview with datatable as a datasource - user edits
I have a winform project in visual studio. I have placed a datagridview on the from. I build a DataTable with data from a database. I then add a new column to the datatable and assign the datatable as the datasource for the datagridview. Run the…
Can someone help me solve this problem in C#?
There is a number 1 written on the board. We have a sequence a of n natural numbers, and in the i-th step (1 ≤ i ≤ n), we erase the current number on the board and replace it with the product of that number and the number a[i]. After each step, determine…
Bubble sort implementation in c#
Here's how to implement a bubble sort in c#. Follow for more content like this :) int[] array = { 108, 23, 69, 420, 9 }; int temporary; for (int j = 0; j <= array.Length - 2; j++) { for (int i = 0; i <= array.Length - 2; i++) { if…
How to generate balance seed using LINQ query
I have some data on the left side of the image below. I want to create a balance seed like the one on the right side using Screenshot (22).png
How do I receive the download progress of a Microsoft Store package? | WinUI/UWP
Hi. I'm installing a package from the Microsoft Store from my WinUI application, but I'd like to see the download progress. I have the following code on Constructor: PackageCatalog packageCatalog => PackageCatalog.OpenForCurrentUser(); And when I…
Can C# detect exponents like 2² , 2³ not the ones with carets(^)
Can C# detect exponents like 2² , 2³ not the ones with carets(^). I want to detect 2³ and write Base =2 Exponent=3 The below code is from Copilot , It cannot detect 2² using System; using System.Text.RegularExpressions; class Program { static…
I can't change property of a button....
Hello, I wrote an app has 1 datepicker, 2 textblocks, 2 textboxes, and 2 buttons. My problem is one of the buttons remains unabled like below. xaml code for this view is: <Window x:Class="WpfApp3.MainWindow" …
How to Configure Library Files to Run in a Subfolder?
Hello There is a library named TolkDotNet.dll in a c# wpf project. This library references various dll files in the x86 and x64 folders. To get rid of the file confusion, I placed them in the Lib folder as TolkDotNet, x86, x64. Then I showed the…
.NET Framework secure .NET remoting tcp channel fails after upgrade W11 client PC to 24H2
Problem Since upgrading to Windows 11 24H2 on their client PC’s, our customers complain that they cannot use our C# client application (DTC) anymore. The DTC application was running fine on a previous Windows 11 version (and on any other OS). Our DTC…
Facing "Duplicate 'global::System.Runtime.Versioning.TargetFrameworkAttribute' attribute
I have been facing the error below and have been following the main threads on Google. I've tried to delete the obj and bin folders and Rebuild the project, also updated Visual Studio, but I was not successful. Thanks for all of you that can…
Application_start event not firing in server, but works just fine in debug.
We have an .net framework web application running on IIS 10. I've added some code in the Application_start method of Global.asax.cs and it's not getting fired at all in the server. This is working just fine in debug using visual studio 2022 using target…
Reading Data from a COM Port in a .NET Console Application
How can data be read from a device connected to a computer via a COM port using a .NET console application? The device measures the weight of heavy vehicles and is connected to a weigher that displays the results. The existing application on the computer…
Assistance Required for Resolving "System.OutOfMemoryException" in Visual Studio
Subject: Help Needed with System Out-of-Memory Issue in Visual Studio Hello Everyone, I hope you're all doing well. I'm working on a project in Visual Studio that includes a large number of forms, user controls, and images used as icons. However, I am…
Theming of WPF dialog not working for all controls on the dialog
Hi, I need to change color/theme of all controls on WPF dialog whenever there is change of theme from VS2022 (i.e. Tools -> Options -> Color Theme ) I followed below MSDN…
How to Write a DependencyProperty for a TextBlock when it is a child element of a parent Button class in WPF C#?
Hi there, I want to make a Dependency Property for a Text Block and the functionality of this property is to apply a Scale Transformation on the Text Block but I am unable to do that Because it's a child element inside of a Button class. I have a…
How to retrieve variables from the Watch List in Visual Studio using DTE?
Hi everyone! I'm working with DTE in Visual Studio and trying to access variables from the Watch List window. I have code to activate the Watch window, but I'm unsure how to extract the variables and their values. Here's a snippet of my code: var…
How to resolve this issue. I am getting error while sending emails
Error: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.57 Client not authenticated to send mail. Error: 535 5.7.139 Authentication unsuccessful, basic authentication is disabled.…