11,262 questions with C#-related tags

Sort by: Updated
0 answers

Could not load file or assembly 'Microsoft.Diagnostics.FastSerialization', An operation is not legal in the current state. (0x80131509

I have C# project that generates a DLL and exposes static methods to JavaScript (using Microsoft.JavaScript.NodeApi). The DLL exported methods launches an ETL collection. When this static method is called from C#, it works as expected. But calling this…

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,033 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,262 questions
asked 2025-01-31T21:53:56.9633333+00:00
Raghu M 0 Reputation points
1 answer

Calculating total sum of money between dates and displaying the result in label control

Hello, I have been trying to calculate the sum of a particular column in database and display the result in a label control. The column is set as Nvarchar(max). I also need to search for and display the sum based on two dates. I only have one date column…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,083 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,586 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,262 questions
asked 2025-01-31T18:14:16.9866667+00:00
Donald Symmons 3,026 Reputation points
edited a comment 2025-01-31T20:03:23.45+00:00
AgaveJoe 29,681 Reputation points
2 answers

Issues with lists

I am trying to work on HCF I created a list with prime factors and I am trying to load the common factors Parent=16 ,Number=2 , Cnts=4 Parent=48 ,Number=2 , Cnts=4 Parent=48 ,Number=3 , Cnts=1 Should give Parent=16 ,Number=2 , Cnts=4 Parent=48…

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,262 questions
asked 2025-01-31T13:32:05.79+00:00
Kalyan A 355 Reputation points
answered 2025-01-31T18:52:22.3466667+00:00
Kalyan A 355 Reputation points
3 answers

Yield in small explanation // Advantages

Dictionary<string, Order> DicOrders; Is there a simple description of what yield should be used for? Advantages? Is it about speed? class Order { string Name; int Id; double OfferPrice; }

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,262 questions
asked 2025-01-30T18:44:46.69+00:00
Noah Aas 545 Reputation points
answered 2025-01-31T18:37:24.47+00:00
Bruce (SqlWork.com) 70,376 Reputation points
1 answer

Hello I have been doing a POC with semantic kernel API manifest, and i cannot find any good microsoft documentation?

Hello I have been doing a POC with semantic kernel API manifest, and i cannot find any good microsoft documentation, there are some devblogs e.g. https://devblogs.microsoft.com/semantic-kernel/introducing-api-manifest-plugins-for-semantic-kernel-2/ but…

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,262 questions
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,597 questions
asked 2025-01-30T20:13:15.1966667+00:00
Ketan Joshi 20 Reputation points Microsoft Employee
answered 2025-01-31T15:36:02.0133333+00:00
Sina Salam 16,766 Reputation points
0 answers

Win11 Scaling Issues with .NET 4 WinForms Application

A WinForms application developed in .NET 4 is experiencing display issues when running on Windows 11 with a zoom level of 125%. The application does not properly support DPI scaling due to limitations in .NET 4. Attempts to use the Windows API function…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,083 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,262 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,775 questions
asked 2025-01-31T15:21:55.1666667+00:00
The Master 0 Reputation points
5 answers

HttpClient // Timeout // The remote name could not be resolved

Hello, The remote name could not be resolved using (HttpClient client = new HttpClient()) { client.BaseAddress = new Uri(System.BaseAddress); client.Timeout = new TimeSpan(0, 0, System.Timeout); public void Exception(Exception ex, string…

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,586 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,262 questions
asked 2025-01-23T18:48:34.5966667+00:00
Noah Aas 545 Reputation points
commented 2025-01-31T15:17:19.87+00:00
MotoX80 35,231 Reputation points
1 answer

Full duplex operation, functions C++ C#

I have a C# application and a C++ application. Between the two, data should now be exchanged. In C# ReceiveDataFromCPP(String data) SendDatatoCPP(string data) In C++ ReceiveDataFromCSharp(String data) SendDatatoCSharp(string…

.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
342 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,262 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,837 questions
asked 2025-01-30T18:47:23.8+00:00
Noah Aas 545 Reputation points
edited a comment 2025-01-31T15:07:45.1066667+00:00
Castorix31 86,516 Reputation points
0 answers

Im trying to buy roblox premium but when i press buy it just goes to a white screen

Im trying to buy roblox premium but when i press buy it just goes to a white screen when i click the blue buy button

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,262 questions
asked 2025-01-31T14:39:47.26+00:00
TVDEON 0 Reputation points
0 answers

Getting AvailableBytes of memory and PercentIdleTime of CPU from a remote servers with error

I am creating an ASP.NET MVC web app to query a list of server resources like Disk Space, RAM and CPU using WMI classes. Everything worked as expected from my local development environment. All the queries are called using a user account with Admin…

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,262 questions
asked 2025-01-31T14:27:44.1333333+00:00
Nguyen, David V 6 Reputation points
edited the question 2025-01-31T14:28:52.79+00:00
Nguyen, David V 6 Reputation points
1 answer

Win32 context menu items issues

Hello everyone, could you please tell me what can go wrong with getting context menu items via win32? First of all, do I understand correctly that the ampersand in the name is normal? But at the same time, some elements have a localized dwTypeData, some…

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
12,021 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.
815 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,718 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,262 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,601 questions
asked 2025-01-28T15:52:31.3966667+00:00
123244 100 Reputation points
commented 2025-01-31T13:15:02.3633333+00:00
Castorix31 86,516 Reputation points
1 answer

VS 2022 wrongly reports error CS0246

Visual Studio 2022 (version 17.12.4) is reporting error CS0246 'type or namespace could not be found...' for a class EposNowReportsDataSnapshot in a declaration: EposNowReportsDataSnapshot dataSnap = new EposNowReportsDataSnapshot(); The error report is…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,398 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,262 questions
asked 2025-01-19T22:11:58.6866667+00:00
Frank Hindle 0 Reputation points
commented 2025-01-31T10:14:17.36+00:00
Tianyu Sun-MSFT 32,531 Reputation points Microsoft Vendor
0 answers

Entity Framework with Dynamic Table Mapping Based on a Parameter (PostgreSQL Partitioning)

I am using Entity Framework with PostgreSQL and need a way to dynamically map a model to different tables based on a parameter. For example, I have a Cars model, and each company should have its own separate table: Cars_A for Company A Cars_B for…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
777 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,262 questions
asked 2025-01-31T08:50:51.2966667+00:00
Florin 0 Reputation points
edited the question 2025-01-31T09:30:28.7166667+00:00
Florin 0 Reputation points
1 answer

How to upload a file from my local computer to a Sharepoint folder

Hi,  I´m using something like this:   string userName = “nelson.soares@********.pt”; string password = “*********”; var securePassword = new SecureString();   foreach (char c in password) {  securePassword.AppendChar(c); }  using (var…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,083 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
11,153 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,262 questions
asked 2025-01-22T20:48:33.8166667+00:00
Nelson Soares 0 Reputation points
commented 2025-01-31T07:53:21.17+00:00
Xyza Xue_MSFT 27,966 Reputation points Microsoft Vendor
1 answer

How to fix error I want to run C# in VS code but it give me error

'dotnet' is not recognized as an internal or external command, operable program or batch file. . .NET Core debugging will not be enabled. Make sure the .NET Core SDK is installed and is on the path. 2025-01-29 08:52:17.031 [info] Did not find .NET…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,398 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,262 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,023 questions
asked 2025-01-29T03:51:22.9633333+00:00
Tanzeela Fatima 0 Reputation points
commented 2025-01-31T05:59:23.6366667+00:00
Dou Xu-MSFT 170 Reputation points Microsoft Vendor
1 answer

How to fix the error "InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'DAO.DBEngine'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00000021-0000-0010

Hi, I am trying to access DAO.DBEngine for an operation and getting the error " InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'DAO.DBEngine'. This operation failed because the QueryInterface call on…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,767 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,262 questions
asked 2025-01-30T12:22:58.2266667+00:00
Devi E 0 Reputation points
commented 2025-01-31T02:27:44.5333333+00:00
Tiny Wang-MSFT 3,066 Reputation points Microsoft Vendor
0 answers

Issue with "Mandatory" package update status in Microsoft Store

Hi, I am experiencing an issue with the Microsoft Store incorrectly reporting "Mandatory" package update status in some of my UWP applications. Following the official documentation, I implemented an update flow in my application that provides…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
4,083 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,262 questions
asked 2025-01-24T12:43:15.7233333+00:00
Joel 0 Reputation points
commented 2025-01-31T02:18:11.95+00:00
Roy Li - MSFT 33,591 Reputation points Microsoft Vendor
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,920 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,262 questions
asked 2025-01-13T06:37:06.7133333+00:00
Neha 20 Reputation points
edited the question 2025-01-31T01:58:47.11+00:00
Roy Li - MSFT 33,591 Reputation points Microsoft Vendor
0 answers

How to Disable Scrolling in a Navigation View with WindowsAppSDK

I have a WindowsAppSDK app that uses a navigation view control for navigation. For one of the pages, scrolling should be disabled, allowing the page to shrink to fit within the navigation view's content pane. How can scrolling be disabled and the page…

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.
815 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,262 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.
830 questions
asked 2025-01-17T22:59:10.8633333+00:00
jm6271 20 Reputation points
commented 2025-01-31T01:52:30.9866667+00:00
Roy Li - MSFT 33,591 Reputation points Microsoft Vendor
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,083 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,820 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,262 questions
asked 2025-01-16T08:11:55.82+00:00
Vishal2 Bansal 225 Reputation points
edited the question 2025-01-31T01:48:17.8833333+00:00
Roy Li - MSFT 33,591 Reputation points Microsoft Vendor