11,000 questions with C#-related tags

Sort by: Updated
1 answer

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…

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.
11,000 questions
asked 2024-10-10T09:17:42.73+00:00
Cenk 1,021 Reputation points
commented 2024-11-04T15:52:09.7866667+00:00
KOZ6.0 6,480 Reputation points
1 answer

why the property in the derived class is not accessible here?

public class LoanPerformance { public decimal Principal { get; set; } } public class AggregatedPerformance { public int LoanId { get; set; } public decimal Principal { get; set; } public virtual void Aggregate<TLoanPerformance,…

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.
11,000 questions
asked 2024-10-27T16:03:57.3133333+00:00
Jesse Li 0 Reputation points
commented 2024-11-04T12:10:22.2333333+00:00
Jiale Xue - MSFT 46,296 Reputation points Microsoft Vendor
3 answers

Public IP address via C#

Hello, Is there a way to read out the public IP address via C#? [https://whatismyipaddress.com/]

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.
11,000 questions
asked 2024-10-27T15:55:56.7733333+00:00
Noah Aas 460 Reputation points
commented 2024-11-04T11:53:35.2333333+00:00
Castorix31 85,711 Reputation points
0 answers

How to troubleshot HttpWebRequest if X509Certificate is not added properly

Hello all, I am adding a X509Certificate to the HttpRequest like the following: HttpWebRequest request = (HttpWebRequest)WebRequest.Create("webserviceurl"); request.ClientCertificates.Clear(); X509Certificate certificate = new…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,603 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,504 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.
11,000 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,733 questions
asked 2024-11-04T10:19:14.1133333+00:00
Kuler Master 266 Reputation points
edited the question 2024-11-04T11:25:51.8566667+00:00
Kuler Master 266 Reputation points
1 answer One of the answers was accepted by the question author.

is it possible to develop REST api by winform application C#

is it possible to develop REST api by winform application C#? Or I am forced to use asp.net or web to develop? Thank you

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.
11,000 questions
asked 2024-11-04T06:02:05.5966667+00:00
Martin Wang 106 Reputation points
commented 2024-11-04T07:40:09.3666667+00:00
Jiale Xue - MSFT 46,296 Reputation points Microsoft Vendor
0 answers

Cannot click into or scroll word document after opening .... Until I hit Ctrl+Home or interact with some options in the Ribbon Bar

Some of our clients have started reporting a strange issue in Microsoft Word after we open documents using Microsoft.Office.Interop.Word automation When they open a Word document they think that MS Word is hanging. The first indicator that it's not…

Office
Office
A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.
1,699 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.
11,000 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,970 questions
asked 2024-11-01T08:38:27.7966667+00:00
Giuseppe Carafa 96 Reputation points
edited the question 2024-11-04T02:46:01.1066667+00:00
Jiachen Li-MSFT 32,056 Reputation points Microsoft Vendor
0 answers

How to Access and Reconstruct HBITMAP Data from a Debugged Process?

I am developing a Visual Studio 2022 extension to extract HBITMAP objects from the memory of a debugged process for analysis. Ideally, I want to access and reconstruct (when necessary) the raw bitmap data directly, without needing to convert each…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,179 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.
11,000 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,757 questions
Visual Studio Extensions
Visual Studio Extensions
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Extensions: A program or program module that adds functionality to or extends the effectiveness of a program.
226 questions
asked 2024-11-04T01:34:23.8833333+00:00
Cesar 0 Reputation points
commented 2024-11-04T02:38:05.31+00:00
Cesar 0 Reputation points
1 answer

Regenerating AndroidResource(s) For .NET for Android Using Visual Studio 2022

I am working on converting a Xamarin.Android app to .NET for Android. I have created an entirely new Solution & Project in Visual Studio 2022 & I used the Android Application Project Template. Visual Studio 2022 creates the following…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,906 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,179 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,581 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.
11,000 questions
asked 2024-10-29T22:43:06.9933333+00:00
Nathan Sokalski 4,106 Reputation points
commented 2024-11-04T02:29:44.93+00:00
Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 43,926 Reputation points Microsoft Vendor
1 answer

What is this error message mean? CS0115

Dear all, How to fix the error: CS0115 'Student_Form.Dispose(bool)': no suitable method found to override NewTims C:\Users\benta\source\repos\NewTims\Student_Form.Designer.cs 14 using System.Data; using System.Data.SqlClient; namespace NewTims { …

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.
11,000 questions
asked 2024-11-02T09:17:01.64+00:00
BenTam 1,701 Reputation points
answered 2024-11-04T02:01:11.8+00:00
Jiachen Li-MSFT 32,056 Reputation points Microsoft Vendor
0 answers

>net maui error cs1001 Identifer expected (net8.0)

I've trying to convert my Xamarin project to .Net Maui for the couple of months, I finally got all of the pages to compile (so Far I think) I'm only getting 4 error now, cs1001 Idenitfier expected MyProject (net8.0-android) App.xaml.sg.cs line…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,179 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,581 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.
11,000 questions
asked 2024-10-26T23:45:23.1433333+00:00
tim 200 Reputation points
commented 2024-11-04T01:52:16.2533333+00:00
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 32,306 Reputation points Microsoft Vendor
2 answers One of the answers was accepted by the question author.

CoreWebView2.NavigateToString(String) method fails to load an HTML page

I am using an instance of WebView2 class to display some HTML content in a UI panel for a VS 2022 extension. I can retrieve the HTML content that I want to display in the WebView2 control as a string, and then I am trying to use…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,179 questions
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.
792 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,650 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.
11,000 questions
asked 2024-10-31T17:08:20.23+00:00
AdiGeo 20 Reputation points
edited the question 2024-11-04T01:02:02.5933333+00:00
Roy Li - MSFT 33,371 Reputation points Microsoft Vendor
1 answer

How to properly bind a property to a DependencyObject?

I've got a window and a view model for that window. In that view model, I have a property called Description and it is updated every second. I also have a user control called CustomControl and it has a dependency property called Description that is bound…

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.
11,000 questions
asked 2024-11-02T23:22:51.38+00:00
Forrest Crawford 60 Reputation points
answered 2024-11-03T07:11:29.5766667+00:00
Viorel 118K Reputation points
1 answer

Why is the blazor css isolation not working?

I have an AppLogin.razor component and its css file is AppLogin.razor.css. They are working fine. I have a UserLogin.razor component and its css file is UserLogin.razor.css. The working mechanism is as follows When you login from the AppLogin.razor…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,906 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,603 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,595 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,504 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.
11,000 questions
asked 2024-02-25T21:05:38.5766667+00:00
Haneen Al-fakhry 10 Reputation points
commented 2024-11-02T22:49:59.3666667+00:00
SurferOnWww 3,031 Reputation points
1 answer

How to get a particular column from table and display in in label and not in the list in sqlite database in mvvm model

In MVVM model using async connection, I want to retrieve just one column from my async table to a label not to list. all sample I am seeing put all column in the list . I want only one mesa1 column to be displayed in a label.text. public async Task

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,955 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,581 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.
11,000 questions
asked 2024-06-08T10:40:43.1+00:00
Gbenga Banuso Odumosu 40 Reputation points
edited the question 2024-11-02T09:01:25.26+00:00
simo-k 555 Reputation points
3 answers

Where is system.device.location?

I am trying to use the GeoCoordinateWatcher in my WPF application. Whenever I type the using statement "using System.Device.Location" I am told it does not exist. I have read that I have to add it as a reference but when I go to the list of…

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,783 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.
11,000 questions
asked 2022-03-16T00:46:27.013+00:00
Ike 6 Reputation points
commented 2024-11-02T01:51:06.2766667+00:00
Steve Shaw 0 Reputation points
2 answers One of the answers was accepted by the question author.

How to add the date selected to an ASP.net form with text boxes ? / v 3,5

hi, I an using a simple asp,net form to get the name, number and email address from my web page. It works fine but there is also a JS date picker which looks good and I am happy with it. My question is how do I pass the selected date to the code behind…

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,504 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.
11,000 questions
asked 2024-10-03T18:59:32.04+00:00
Matt Lee 40 Reputation points
edited the question 2024-11-01T08:23:23.24+00:00
Jack J Jun 24,516 Reputation points Microsoft Vendor
1 answer

errors in Cart Count update, items not adding Cart, and Cart Total is not updating

Thank you in advance, Can you help me remove the errors? My github Link:Thibaut501/Mango. errors are Count of items cannot be updated, Items is not adding to Cart and Order Total is not updating on Applying Coupon .Discount is not appearing also. its…

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,955 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.
11,000 questions
asked 2024-10-27T11:09:34.3566667+00:00
Thibaut Fabrice 0 Reputation points
commented 2024-11-01T01:22:31.8333333+00:00
Hongrui Yu-MSFT 2,465 Reputation points Microsoft Vendor
1 answer

How to enhance Performance set Data from SQL to Excel sheet by C# .net core?

I recieve 900000 row from database and I entire it in Excel sheet by XLWorkbook Liberary but it take More 20 minute it is very very slow and in sometime give my TimeOut Error , So what the solution or another tech to enhance performance

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,603 questions
Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,954 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.
11,000 questions
asked 2024-10-29T15:49:05.1133333+00:00
Mahmoud elsayed 0 Reputation points
commented 2024-10-30T22:20:36.6533333+00:00
Mahmoud elsayed 0 Reputation points
7 answers

How to target .NET Framework 4.0 in VS 2022 on Windows 11?

Working on some old projects targeting .NET Framework 4.0. I used VS 2022 to open the solution and was told to install 4.0 targeting pack. I can't find the download link on the dotnet website, nor the installation option in Visual Studio Installer. …

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.
11,000 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,166 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
1,004 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
9,858 questions
asked 2022-09-05T07:41:23.313+00:00
Lee Feng 151 Reputation points
edited a comment 2024-10-30T20:47:04.4166667+00:00
Holger B 0 Reputation points
2 answers

Issues with Task and Custom Classes in C# Interfaces

In a C# project with an Infrastructure.DataAccess.Shared assembly containing interfaces for various data providers, only primitive types can be utilized in these interfaces. Attempts to use types like Task for asynchronous methods or custom classes…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,603 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.
11,000 questions
asked 2024-10-29T12:36:06.0333333+00:00
Nikola Hadzhiev 0 Reputation points
commented 2024-10-30T16:58:22.0166667+00:00
Bruce (SqlWork.com) 66,226 Reputation points