11,202 questions with C#-related tags

Sort by: Updated
0 answers

How to set a time limit for speech recognition in ACS?

I want to set a limit to the time a caller has to describe their problem after StartRecognizing has started. I tried to implement this using CancellationToken, but it didn't work, and CancelAllMediaOperations doesn't seem to be effective either. Here is…

Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
965 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,202 questions
asked 2025-01-16T11:37:36.75+00:00
Nikolaj Wojke 0 Reputation points
edited the question 2025-01-17T14:05:52.1966667+00:00
Nikolaj Wojke 0 Reputation points
2 answers

How Can I Detect if the System Clock is Moved Forward or Backward in a C# WPF Application?

Hello, In my C# WPF desktop project, I want to detect if the system clock has been moved forward or backward. When such a change is detected, I would like to take specific actions. For example: Show a warning if the system clock is moved forward. Log an…

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,812 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,202 questions
asked 2025-01-16T10:34:03.34+00:00
fatih uyanık 160 Reputation points
commented 2025-01-17T10:49:33.2666667+00:00
RLWA32 46,461 Reputation points
0 answers

When i publish my project, files included with a nuget package are not copied

I have a project using a custom nuget package. The nuget package uses some dlls, added to the project with property "Copy to output directory" set to "Copy always". When I install the nuget package in the main project the dlls are…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,052 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,202 questions
Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying tests as a means of analysis or diagnosis.
354 questions
asked 2025-01-17T10:41:13.2466667+00:00
omar.laner 0 Reputation points
2 answers

[iOS] MAUI app crashing when calling function from external library in Release mode, but works in Debug mode

MAUI .NET 9, 9.0.21, targeting iOS and Android I'm observing the app crashing on iOS when running in Release mode build from TestFlight on physical device, but works when running in Debug mode in simulators. The app crashes when a particular method is…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,830 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,202 questions
asked 2025-01-15T15:15:36.6666667+00:00
Muhammad Sharif Uddin 0 Reputation points
answered 2025-01-17T10:24:07.1733333+00:00
Muhammad Sharif Uddin 0 Reputation points
3 answers One of the answers was accepted by the question author.

Need help with a lottery program

I have to make a lottery program as a school project. I've done most of it but don't have any idea how to compare the user input to the computer-generated one. This is the code: using System; namespace gamblinf { class Program { public…

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,202 questions
asked 2022-01-13T16:05:22.263+00:00
D3migodly 21 Reputation points
edited a comment 2025-01-17T05:46:43.33+00:00
Lunchtime Results 0 Reputation points
1 answer

I want to lock the current HDMI port in C# WPF (.NET Framework)?

I want to lock the HDMI port. If a HDMI port is used for a monitor then if other HDMI port is used then i want to lock existing port. How to do so in C# WPF?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,052 questions
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,812 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,708 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,202 questions
asked 2025-01-16T08:11:55.82+00:00
Vishal2 Bansal 205 Reputation points
edited an answer 2025-01-17T03:03:27.61+00:00
Hongrui Yu-MSFT 3,965 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,202 questions
asked 2025-01-07T07:47:11.1233333+00:00
Deepak Rane (drane) 60 Reputation points
commented 2025-01-17T02:11:54.5533333+00:00
Jiale Xue - MSFT 48,691 Reputation points Microsoft Vendor
1 answer

Office Outlook Interop Issue

I recently started having an issue with our email reading utility after the December 2024 Outlook update. I can no longer read email body from a folder. VS 2022 keeps crashing giving generic access errors. Error Section Snippet: mi.EmailBodyText =…

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,202 questions
asked 2025-01-15T17:30:42.0633333+00:00
Micah Holmes 1 Reputation point
commented 2025-01-17T02:10:42.1266667+00:00
Jiale Xue - MSFT 48,691 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,052 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,202 questions
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,536 questions
asked 2025-01-07T05:21:51.9366667+00:00
Khimananda Acharya 0 Reputation points
commented 2025-01-17T01:44:20.97+00:00
Khimananda Acharya 0 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,052 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,315 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,202 questions
asked 2025-01-06T06:11:18.7833333+00:00
Vaibhav Pol 15 Reputation points
commented 2025-01-17T01:09:09.95+00:00
Hongrui Yu-MSFT 3,965 Reputation points Microsoft Vendor
7 answers

Unable to cast COM object of type 'Microsoft.Office.Interop.Excel.ApplicationClass'

Hi I've this C# application which opens excel file and updated another excel file. The application developed in Visual studio 2005 and Office 2016. I've recently uninstalled Office 2016 and installed Office 365. Since then " Unable to cast…

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,202 questions
asked 2021-02-04T07:21:21.033+00:00
Venkata Ramana Nori 36 Reputation points
commented 2025-01-16T18:24:06.1566667+00:00
Mauro Rodriguez 0 Reputation points
1 answer One of the answers was accepted by the question author.

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,830 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,202 questions
asked 2025-01-08T17:19:31.36+00:00
Phunction 281 Reputation points
accepted 2025-01-16T16:49:52.97+00:00
Phunction 281 Reputation points
1 answer One of the answers was accepted by the question author.

Button appearing above page content for all pages on iOS tablet - .NET MAUI

Hi, I have a .NET 8 MAUI app that I'm developing for Android and iOS. I have an issue where all of my pages are showing a blank space at the top with a button, but it's only doing that on iOS when on a tablet. My iPhone doesn't show it and neither does…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,830 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,202 questions
XAML
XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
827 questions
asked 2025-01-15T09:13:50.77+00:00
Ben 25 Reputation points
commented 2025-01-16T15:47:34.4166667+00:00
Ben 25 Reputation points
1 answer

NPGSQL - Common Language Runtime detected an invalid program.

I have two servers with windows server 2019 and an a Simple API project developed with .NET 8. The project use Npgsql library at version 4.0.0. The configuration between servers are the same: same path same .NET hosting bundle same IIS…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,052 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,736 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,202 questions
asked 2024-10-01T06:22:10.66+00:00
DSpada 0 Reputation points
commented 2025-01-16T15:33:21.5133333+00:00
Eleena SAin 0 Reputation points
1 answer One of the answers was accepted by the question author.

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,812 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,202 questions
asked 2025-01-13T10:16:24.99+00:00
fatih uyanık 160 Reputation points
accepted 2025-01-16T10:36:06.14+00:00
fatih uyanık 160 Reputation points
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,969 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,052 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,202 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,451 questions
asked 2025-01-13T08:46:23.4033333+00:00
Mr.Postal 20 Reputation points
commented 2025-01-16T09:44:25.2833333+00:00
Jiale Xue - MSFT 48,691 Reputation points Microsoft Vendor
1 answer

I want to disable/enable usb and HDMI port whenever my c# wpf (.net Framework 4.7.2) app runs.

Online resources are not present for above queries. I want solution for both admin/non-admin user account. Please help to provide me the solution.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,052 questions
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,812 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,708 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,202 questions
asked 2025-01-15T12:29:34.7333333+00:00
Vishal2 Bansal 205 Reputation points
edited a comment 2025-01-16T08:46:52.3033333+00:00
Hongrui Yu-MSFT 3,965 Reputation points Microsoft Vendor
1 answer

myFolder.CurrentView may return the wrong view

We are developing an Outlook add-in which modify the CurrentView of folders when switching folders in Outlook. However, we noticed a weird problem. We retrieved the CurrentView of a folder roughly by: … Outlook.Folder myFolder =…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,052 questions
Outlook
Outlook
A family of Microsoft email and calendar products.
4,319 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,202 questions
asked 2025-01-16T02:01:28.76+00:00
Lawrence Wong 0 Reputation points
answered 2025-01-16T06:34:40.6866667+00:00
Hornblower409-4652 75 Reputation points
2 answers

ERROR INITIALIZECOMPONENT

Hello, good morning, I have been compiling a code in .Net Maui, I have added a SplashScreen and in the C# code of the content page in which the SplashScreen is stored, it gives me the CS0103 error with the InitializedComponent, here is part of the code…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,830 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,202 questions
asked 2023-07-26T21:35:17.5533333+00:00
FluxuRate 50 Reputation points
edited an answer 2025-01-16T02:58:39.4433333+00:00
xingshun Lee 0 Reputation points
2 answers

How to Fix: Applications .exe Fail to Start by Kernelbase.dll error

Hi all, I have encountered an issue as follows: The exe application I developed, when used with Windows 10 for a while, cannot be opened anymore. When I checked the Event Viewer, I saw an Application Error with KERNELBASE.dll. The detailed error is as…

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,969 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,052 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,202 questions
asked 2024-04-16T02:16:36.7433333+00:00
Roy Nguyen 0 Reputation points
commented 2025-01-16T02:25:09.9933333+00:00
RLWA32 46,461 Reputation points