11,008 questions with C#-related tags

Sort by: Updated
1 answer

Displaying image in RDLC report viewer.

I want to display an image from my picture box in my RDLC report viewer. I generate a barcode and display it in the picture box. private void Print_Click_1(object sender, EventArgs e) { Barcode barcode = new Barcode(); int width =…

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,008 questions
asked 2024-08-23T16:13:06.0133333+00:00
Anonymous
answered 2024-11-07T18:09:04.0366667+00:00
maalaoui souheil 0 Reputation points
1 answer

multiple git local repositories for a visual studio 2022 solution with multiple projects

I have visual studio professional 2022 installed. I have a solution named Bigfoot. In Bigfoot I have 3 projects. One is desktop, one is communication and one is exports. I want to have a git local repository for desktop, a different one for…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,191 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,008 questions
asked 2024-11-07T16:26:47.0166667+00:00
Darryl Hoar 181 Reputation points
answered 2024-11-07T16:30:46.9766667+00:00
Bruce (SqlWork.com) 66,621 Reputation points
3 answers One of the answers was accepted by the question author.

Difference between 'client.GetStringAsync' and 'await client.GetStringAsync'

Hello! I have a synchronous function that I cannot change to async. How can I still call it correctly without using GetAwaiter? Task<string> task = client.GetStringAsync("http://ifconfig.me"); Task<string> task3 =…

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,008 questions
asked 2024-11-06T15:32:36.5333333+00:00
Noah Aas 460 Reputation points
answered 2024-11-07T11:54:12.7333333+00:00
TP 97,996 Reputation points
1 answer

Windows Session Authentication

Hello All, We have a Windows application built on .Net Framework 4.8. This application provides a login window was until now being handled by an SQLite database. But now we would want to implement 'Windows Session Management'. We must also get the role…

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,008 questions
asked 2024-11-07T09:01:18.4466667+00:00
S Abijith 426 Reputation points
answered 2024-11-07T09:57:56.7966667+00:00
Jiale Xue - MSFT 46,456 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

Showing System.Drawing.Bitmap in MAUI form?

Hello, I want to do a MAUI applciation able to read a USB camera from IDS and paint the incoming images in the main form. I'm able already to detect the camera initialise it and receive the incoming images. I'm able, also, to save those incoming images…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,589 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,008 questions
asked 2023-04-18T15:19:52.75+00:00
Raul C 20 Reputation points
commented 2024-11-07T08:40:14.86+00:00
Raúl Cuevas González 0 Reputation points
0 answers

Drag and drop in Win UI

Hi, I'm doing drag and drop in Win UI application, but I have a problem. In drag and drop there is only Data.SetStorageItems method. It accepts an IStorageItem with which I have no access to hidden files and shortcuts (only using file picker, but in my…

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,712 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,916 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.
794 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,008 questions
asked 2024-11-05T15:20:14.6+00:00
123244 60 Reputation points
commented 2024-11-07T03:11:44.5533333+00:00
Jeanine Zhang-MSFT 9,771 Reputation points Microsoft Vendor
1 answer

brightness dim when plug in to the power cord

so I had a problem with my laptop when I freshly installed Windows 10, at first I installed Windows 10 1511 in 2015 on my Dell Laitutde E5410 laptop, then after everything was installed I tried installing the driver through the driver booster…

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,008 questions
asked 2023-07-07T11:37:50.8466667+00:00
elpathan ganteng 0 Reputation points
commented 2024-11-07T00:05:39.9333333+00:00
rafid mahmood 0 Reputation points
2 answers

C# How to sort version number

Suppose we have series of version number stored in List<string>. i need to sort those version number ascending or descending order. i have the done the job this way. my code attached. var ver = new…

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,008 questions
asked 2023-01-19T20:17:40.7766667+00:00
T.Zacks 3,996 Reputation points
commented 2024-11-06T23:24:37.1766667+00:00
Arny CP 0 Reputation points
7 answers

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…

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,008 questions
asked 2024-05-04T22:39:27.66+00:00
Moshe Yalovsky 5 Reputation points
commented 2024-11-06T19:10:36.01+00:00
Wong, Zhi C 0 Reputation points
3 answers One of the answers was accepted by the question author.

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,008 questions
asked 2024-10-27T15:55:56.7733333+00:00
Noah Aas 460 Reputation points
accepted 2024-11-06T15:29:06.1166667+00:00
Noah Aas 460 Reputation points
1 answer

How to add a keyboard shortcut on a Visual Studio extension?

I'm trying to learn how to create a keyboard shortcut on a Visual Studio 2022 extension. I would like to get the shortcut visible and editable at Tools > Options > Environment > Keyboard Steps i tried: Addded: …

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,191 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,008 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.
227 questions
asked 2024-11-05T09:21:24.5366667+00:00
Cesar 20 Reputation points
edited the question 2024-11-06T01:37:56.2766667+00:00
Cesar 20 Reputation points
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,008 questions
asked 2024-10-10T09:17:42.73+00:00
Cenk 1,021 Reputation points
commented 2024-11-05T18:08:58.5266667+00:00
Cenk 1,021 Reputation points
0 answers

C# Application Closes immediate after calling MainWindow.Show()

I have a Project in VS that I could Debug and Open normally on my old machine. On my new Machine I have installed VS2022 Enterprise, there it closes immediately Following Problem: When I call _mw = new MainWindow(); the application just ends: Following…

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,008 questions
asked 2024-11-05T13:15:07.65+00:00
Falk Christian 0 Reputation points
commented 2024-11-05T13:35:33.6266667+00:00
Jiale Xue - MSFT 46,456 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,611 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,507 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,008 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,735 questions
asked 2024-11-04T10:19:14.1133333+00:00
Kuler Master 266 Reputation points
commented 2024-11-05T09:50:00.23+00:00
Kuler Master 266 Reputation points
1 answer One of the answers was accepted by the question author.

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,008 questions
asked 2024-11-02T09:17:01.64+00:00
BenTam 1,721 Reputation points
accepted 2024-11-05T09:15:48.5233333+00:00
BenTam 1,721 Reputation points
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,916 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.
794 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,008 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
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,008 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,916 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,008 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,008 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,657 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,008 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,456 Reputation points Microsoft Vendor