11,002 questions with C#-related tags

Sort by: Updated
1 answer

WinUI 3 - How to Retrieve ActivatedEventArgs Multiple Times?

The documentation states that AppInstance.GetActivatedEventArgs this method will only return the arguments the first time it is called in an app. If a packed single-instanced WinUI 3 app is activated from a protocol multiple times, what approach can…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,908 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.
793 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,002 questions
asked 2024-11-05T03:15:54.47+00:00
Lee Feng 151 Reputation points
answered 2024-11-05T06:56:37.2633333+00:00
Jeanine Zhang-MSFT 9,771 Reputation points Microsoft Vendor
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,604 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,002 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
commented 2024-11-05T06:42:11.3033333+00:00
JasonPan - MSFT 5,906 Reputation points Microsoft Vendor
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,002 questions
asked 2024-10-10T09:17:42.73+00:00
Cenk 1,021 Reputation points
commented 2024-11-05T04:36:39.08+00:00
Cenk 1,021 Reputation points
1 answer One of the answers was accepted by the question author.

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,002 questions
asked 2024-11-02T23:22:51.38+00:00
Forrest Crawford 80 Reputation points
accepted 2024-11-05T01:19:01.4733333+00:00
Forrest Crawford 80 Reputation points
1 answer One of the answers was accepted by the question author.

Looking for a C# IOCP example/tutorial

I'm trying to find a good .NET example of how to do TCP networking using IOCP and C#. The examples that I've been finding uses interop calls to do IOCP. Unless I'm wrong, my understanding is that nowadays it's no longer necessary to use interop calls…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,908 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,002 questions
asked 2024-11-04T19:48:39.2166667+00:00
Richard Rosenheim 86 Reputation points
commented 2024-11-04T23:53:11.0666667+00:00
Richard Rosenheim 86 Reputation points
1 answer

How to parse SNMP traps in C#?

Hi All, We have a C# console application built on .Net core. We have requirement to parse SNMP trap in C#. My question is is there any method/class available in to parse below sample SNMP trap? Sample SNMP trap: 2020-08-04 04:56:45 04:56:44 2020/08/04…

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,002 questions
asked 2022-05-10T10:10:39.327+00:00
B-K Hariprasad 1 Reputation point
answered 2024-11-04T22:15:03.3133333+00:00
Lex Li (Microsoft) 5,582 Reputation points Microsoft Employee
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,002 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,002 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
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,002 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,002 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,974 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,181 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,002 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,758 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 20 Reputation points
commented 2024-11-04T02:38:05.31+00:00
Cesar 20 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,908 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,181 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,002 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,002 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,181 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,002 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,181 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.
793 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,648 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,002 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

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,908 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,604 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,002 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,041 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,961 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,002 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,002 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,002 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,961 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,002 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