11,190 questions with C#-related tags

Sort by: Updated
1 answer

How to Design Validation, Error Management, and Message Service in a Layered Architecture for a WPF Project?

Hello I am working on a WPF application using the MVVM pattern and performing validations through a centralized ValidationService that leverages FluentValidation. During the validation process, I need to check whether an ISBN already exists in the…

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,808 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,190 questions
asked 2025-01-13T10:16:24.99+00:00
fatih uyanık 160 Reputation points
commented 2025-01-14T10:14:24.5933333+00:00
fatih uyanık 160 Reputation points
0 answers

WixProj output name

I have this wixproj, whose output file is an msi.How can I set the name of this MSI.I have tried using outputname tag but its not part of property group as per this - [http://schemas.microsoft.com/developer/msbuild/2003]

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,190 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,822 questions
asked 2025-01-14T07:11:02.0733333+00:00
Bevan Thomas 60 Reputation points
commented 2025-01-14T10:03:48.4033333+00:00
RLWA32 46,381 Reputation points
1 answer

windows.opener() handling with WebView2

In the webform, I have used window.opener for opening a new window that acted as a dialog which required user input, and needed to pass information back to the main window. I am trying to embed this in winform using WebView2 control.The…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,917 questions
Universal Windows Platform (UWP)
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,190 questions
asked 2025-01-13T06:37:06.7133333+00:00
Neha 20 Reputation points
commented 2025-01-14T09:43:26.1+00:00
Jiale Xue - MSFT 48,686 Reputation points Microsoft Vendor
2 answers One of the answers was accepted by the question author.

Graph API - Unable to restore messages in non-draft state during backup/restore implementation

We are implementing a backup/restore solution for Microsoft 365 messages using Graph API. During the restore process, we are experiencing a critical limitation where all restored messages are marked as drafts, regardless of their original state. …

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,769 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,190 questions
asked 2024-12-23T09:41:17.77+00:00
Shyamjith Cherukara 20 Reputation points
answered 2025-01-14T08:33:37.76+00:00
Shyamjith Cherukara 20 Reputation points
1 answer

Unable to display alert after modal popup

I have an issue I am unable to solve. In this code: var popupPage = new myPopup(); var taskCompletionSource = new TaskCompletionSource<bool>(); // Set up an event to resolve the task when the modal is dismissed popupPage.Disappearing += (s, args)…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,810 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,190 questions
asked 2025-01-08T17:19:31.36+00:00
Phunction 261 Reputation points
commented 2025-01-14T08:28:13.1666667+00:00
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 34,226 Reputation points Microsoft Vendor
1 answer

WinUI3 TabView Binding Not Updating Correctly - Recycling Instances?

Is this a bug in TabView implementation? Or what could I be doing wrong? Summary: Binding seems to get out of sync when adding and removing tabs from tab TabView. Minimal Working Example that Demonstrates the Issue: Code for minimal working example…

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.
809 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,190 questions
asked 2025-01-13T17:40:45.3233333+00:00
Eric Brandt 45 Reputation points
answered 2025-01-14T02:23:40.4866667+00:00
Jeanine Zhang-MSFT 10,356 Reputation points Microsoft Vendor
1 answer

How to Enable Fullscreen for Console Applications in Windows 10 and Windows 11

It has been observed that Windows 10 and Windows 11 have different behaviors regarding fullscreen for console applications. Currently, a console application does not enter fullscreen mode as it did on Windows 10 with the code i used. CodeBlock: class…

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,959 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,039 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,190 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,420 questions
asked 2025-01-13T08:46:23.4033333+00:00
Mr.Postal 20 Reputation points
commented 2025-01-14T01:46:15.8966667+00:00
Jiale Xue - MSFT 48,686 Reputation points Microsoft Vendor
2 answers

c# binding datagrid wpf

Ciao A tutti, ho creato questo codice namespace WpfApplication6 { /// <summary> /// Logica di interazione per MainWindow.xaml /// </summary> public partial class MainWindow : Window { …

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,190 questions
asked 2025-01-08T09:39:38.3533333+00:00
Marco Boscolo 0 Reputation points
commented 2025-01-14T01:05:54.1233333+00:00
Hongrui Yu-MSFT 3,730 Reputation points Microsoft Vendor
1 answer

How to get the assistant to use the vector store using Azure OpenAI: OpenAI Assistants client library for .NET

Hi, Seeking help getting the assistant to use the vector store using the library below: Azure OpenAI: OpenAI Assistants client library for .NET - version 1.0.0-beta.4 For some context: I've created a Vector store as well as an Assistant within Azure AI…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,039 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,190 questions
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,510 questions
asked 2025-01-07T05:21:51.9366667+00:00
Khimananda Acharya 0 Reputation points
commented 2025-01-14T01:03:18.3366667+00:00
Daniel FANG 1,040 Reputation points MVP
2 answers

Why does the onclick event not work, in my razor pages hosted blazor component, in .net 7.0?

I've used the following code in multiple blazor web assembly applications hosted on a razor pages page under .net 5.0 and .net 6.0 before now. An application I was forced to upgrade to .net 7.0 has rendered the onclick command completely useless What…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,731 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,645 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,190 questions
asked 2023-01-19T00:23:45.6266667+00:00
The Acme Cheese Company 0 Reputation points
answered 2025-01-14T00:12:39.4066667+00:00
Alex Stewart 0 Reputation points
2 answers

Create new event with location

Using this article: https://zcusa.951200.xyz/en-us/graph/api/resources/location?view=graph-rest-1.0 I'm trying to use graph api to create a new calendar event with location. For location, I'm putting a random string name in displayName, say…

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,769 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,190 questions
asked 2025-01-09T21:47:19.62+00:00
Christopher R 20 Reputation points
commented 2025-01-13T08:44:49.7466667+00:00
Yakun Huang-MSFT 8,905 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

How to query mssql to get weekly time interval from the first day the data was created for a period of 1 year

Hello, I am trying to write sql query to to get weekly time interval from the first day the data was created for a period of 1 year to select number of week of the current date for a particular user Id. Below is my mssql query. WITH WeeklyIntervals AS…

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,286 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,190 questions
asked 2025-01-09T09:38:28.99+00:00
Emeka Okoye 126 Reputation points
accepted 2025-01-13T07:39:30.0866667+00:00
Emeka Okoye 126 Reputation points
3 answers One of the answers was accepted by the question author.

How to fix code throwing exception : Microsoft.Data.SqlClient.SqlException: 'Login failed for user '

Hi All, I'm encountering an issue while trying to connect to an Azure SQL Database using Microsoft Entra Authentication (formerly Azure AD). I am using DefaultAzureCredential in my .NET application to authenticate and retrieve the access token, but…

Azure SQL Database
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,286 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,190 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,154 questions
asked 2025-01-03T00:29:43.2+00:00
Krishna Basavaraj K S 20 Reputation points
edited the question 2025-01-13T06:03:32.1033333+00:00
Raja Pothuraju 10,760 Reputation points Microsoft Vendor
0 answers

How to embed Power bi reports into Azure bot framework (chatbot) C#?

Hi Team, How to embed Power BI Tile or Dashboard into bot's response? Have found similar thread https://github.com/microsoft/BotFramework-WebChat/issues/2790but it's in JS. Do we have any similar solution in C# as well? Thanks, Naveen

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,190 questions
asked 2023-09-22T12:18:50.07+00:00
REDDY, REDDYVALLA NAVEENKUMAR 115 Reputation points
commented 2025-01-13T05:49:42.0333333+00:00
Shribani Prabhat 0 Reputation points
1 answer

In Azure Web PubSub, How to receive messages in backend microservice for processing

Requirement: My clients are using simple WebSocket connection to send messages. I want to receive these messages inside my backend .NET 8 web api and process them further to send fine-tuned data to some distributed cache services. From documentation, I…

Azure Web PubSub
Azure Web PubSub
An Azure service that provides real-time messaging for web applications using WebSockets and the publish-subscribe pattern.
81 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,731 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,190 questions
asked 2025-01-10T05:55:02.9966667+00:00
dheeraj awale 1 Reputation point
edited a comment 2025-01-13T04:20:18.5766667+00:00
dheeraj awale 1 Reputation point
2 answers

a exception at writeline: ArgumentOutofRangeException:specified argument was out of range of valid values.

Write line to a file by file stream "streamwriter". Whenever the variable data changes, write a line.It may run abnormally after running for several hours.It may run whole a day without abnomal. The code is as follows: RecordRow dataRow =…

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,190 questions
asked 2025-01-12T12:51:43.3533333+00:00
小姐 董 0 Reputation points
answered 2025-01-13T03:17:36.7666667+00:00
Jiale Xue - MSFT 48,686 Reputation points Microsoft Vendor
2 answers

Using jscript.dll for COM Script Execution in C#

What are the steps to utilize "C:\Windows\System32\jscript.dll" for executing scripts with COM? I am looking for a sample code that demonstrates how to load the JScript DLL dynamically or by reflection, and how to utilize the methods or run…

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,190 questions
asked 2025-01-07T07:47:11.1233333+00:00
Deepak Rane (drane) 60 Reputation points
commented 2025-01-13T02:28:33.9233333+00:00
Jiale Xue - MSFT 48,686 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

Close and then open a new tab page or window asks authentication

I am trying to embed a webform application in WinForm using Webview2 control. The new window opens in a tab page with webview2 child ( e.handled=true). But when destroying the child tab wm_destroy is not calling properly. so each time while open a new…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,917 questions
Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,706 questions
Universal Windows Platform (UWP)
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,190 questions
asked 2025-01-11T04:26:32.7333333+00:00
Neha 20 Reputation points
accepted 2025-01-13T02:00:16.2866667+00:00
Neha 20 Reputation points
1 answer

Facing issues for the mismatch definitions of some methods from SQLEditors.dll used in SSMS 21

I am trying to consume the SQLEditors.dll from SSMS 21 and SSMS20 in my C# code however getting the compilation issue due to incorrect format of library as error : D:\BuildAgentB\work\fb305f1670873990\VersionSpecific.CommonFiles\NewQueryWriter.cs(83,…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,039 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,286 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,190 questions
asked 2025-01-06T06:11:18.7833333+00:00
Vaibhav Pol 15 Reputation points
commented 2025-01-13T01:10:24.28+00:00
Hongrui Yu-MSFT 3,730 Reputation points Microsoft Vendor
1 answer

Title: API Data Not Displayed in DataGridView - Need Help with C# Integration

Hello everyone, I’m working on a C# project where I’m trying to fetch fuel purchase data from the KeepTruckin API and display it in a DataGridView. While I can connect to the API successfully and receive a response (verified with raw JSON data in a…

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,190 questions
asked 2025-01-12T19:12:17.8433333+00:00
Mizael Antonio Tovar Reyes 0 Reputation points
answered 2025-01-12T22:58:57.7033333+00:00
Michael Taylor 55,921 Reputation points