10,648 questions with C#-related tags

Sort by: Updated
2 answers

I am using the MVVM pattern and I want to get the value of the property in the OnPropertyChanged event

I want to get the value of the property in the OnPropertyChanged event. I would rather not use reflection.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,231 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.
10,648 questions
asked 2024-07-10T16:20:54.3866667+00:00
Tom Meier 220 Reputation points
commented 2024-07-18T07:10:19.25+00:00
juliawhites 0 Reputation points
1 answer One of the answers was accepted by the question author.

How to fix an exception: Could not load file or assembly 'Microsoft.DirectX.AudioVideoPlayback, Version =1.0.2902.0....'

I was writing a C# WinForm which can play videos. I'd add the reference, 'Microsoft.DirectX.AudioVideoPlayback.dll' and compile was ok, but it failed when running with the mentioned exception. I'd searched the question through internet and I found that…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,647 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.
10,648 questions
asked 2024-07-17T02:53:02.9166667+00:00
Zhe-Yu Lee 20 Reputation points
commented 2024-07-18T05:50:47.9166667+00:00
Zhe-Yu Lee 20 Reputation points
0 answers

How to troubleshoot the exception, Could not create TLS secure channel?

Hello there, I have this C# code that consumes a SOAP WS and it was working properly for years. However, since recently it started to throw the following exception: The request was aborted: Could not create SSL/TLS secure channel. Basically it imports…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,400 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,417 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.
10,648 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
318 questions
asked 2024-07-12T14:24:34.8133333+00:00
Kuler Master 266 Reputation points
commented 2024-07-18T04:57:23.8966667+00:00
Tiny Wang-MSFT 2,321 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,647 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,400 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,500 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,417 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.
10,648 questions
asked 2024-02-25T21:05:38.5766667+00:00
Haneen Al-fakhry 5 Reputation points
commented 2024-07-18T04:27:09.24+00:00
Akkarapol Utbuawong 0 Reputation points
2 answers

How to read pdf,jpeg,gif document using tesseract OCR with C# asp.net MVC

Currently we have one page and this page contains one file-upload and one submit button, then the user will select a file from file-upload and submit the pdf,jpeg,gif file. Now my requirement is the user will upload pdf,jpeg,gif read the content of the…

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,417 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.
13,360 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.
10,648 questions
asked 2023-11-11T21:00:28.0866667+00:00
coder rock 296 Reputation points
commented 2024-07-18T03:35:12.0433333+00:00
winironteam 36 Reputation points
3 answers One of the answers was accepted by the question author.

This error appears to me. I use .NET 8. The project is divided into three layers. The presentation layer is a web project. The rest of the layers are class libraries. I installed the necessary libraries, all of which are version 8.

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
726 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,400 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.
10,648 questions
asked 2024-07-16T20:30:25.5766667+00:00
saleh salem 20 Reputation points
commented 2024-07-17T23:07:23.29+00:00
saleh salem 20 Reputation points
2 answers One of the answers was accepted by the question author.

Number of references to class variable is incorrect

I created a class level variable in the Program.cs file and use it 27 times within that file. I can do a search for the variable name and make sure spelling isn't an issue. If I go look at the number of times the variable has a reference as stated where…

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.
10,648 questions
asked 2024-07-16T15:32:14.52+00:00
Brown, Matt 46 Reputation points
accepted 2024-07-17T22:31:10.37+00:00
Brown, Matt 46 Reputation points
6 answers

Visual Studio find text in code editor auto jumps from the current line to another one

Hello, Does someone knows how to fix an annoying behaviour in the code editor of Visual Studio.? I have a .cs file with 10 000 lines of code. I am positioned within the file to see the lines from 920 to 950 I am trying to find a specific text…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,887 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.
10,648 questions
asked 2021-12-14T15:38:27.647+00:00
Liviu Ionut Olteanu 11 Reputation points
commented 2024-07-17T19:53:19.1833333+00:00
QuickBooksDev 1 Reputation point
1 answer One of the answers was accepted by the question author.

I created a SSIS package to fetch data from an API to store in the Data Warehouse. But I am getting the runtime error in my script task. I even used try/catch to figure out the error, but nothing is working.

Additionally, I am using a variable 'Token' which I declared in ReadWriteVariables. The error - at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at…

SQL Server Migration Assistant
SQL Server Migration Assistant
A Microsoft tool designed to automate database migration to SQL Server from Access, DB2, MySQL, Oracle, and SAP ASE.
517 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.
10,648 questions
asked 2024-07-13T01:33:03.4633333+00:00
Manmohit Singh 20 Reputation points
accepted 2024-07-17T19:25:59.7033333+00:00
Manmohit Singh 20 Reputation points
0 answers

How to migrate KafkaTrigger from in-process to isolated when using schema registry and AVRO

Microsoft is recommending migrating Function apps from in-process to isolated which I am doing in dotnet8. The in-process KafkaTrigger is returning KafkaEventData<byte[]>. With dotnet-isolated it uses…

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,675 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.
10,648 questions
asked 2024-07-17T16:48:17.22+00:00
Greg Moyer 1 Reputation point
0 answers

Blazor hangs when debugging with authentication

Am I the only one who experience that 9 of 10 times Blazor hangs with this message when I use authentication, and after I have logged in?   Any hints on how to get past this issue?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,647 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,500 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.
10,648 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.
967 questions
asked 2024-04-07T11:22:21.7633333+00:00
Finn Arildsen 26 Reputation points
commented 2024-07-17T14:39:52.7266667+00:00
Philippe Cayouette 0 Reputation points
0 answers

How to fix Expression: m_pAccessor != 0 Debug Assertion Failed!

Debug Assertion Failed! Program: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll File: C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.39.33519\atlmfc\include\atldbcli.h Line: 5198 Expression: m_pAccessor != 0 For…

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.
10,648 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,635 questions
asked 2024-07-09T12:58:59.3533333+00:00
Shubham Kshirsagar 0 Reputation points
edited the question 2024-07-17T06:17:59.9+00:00
Roy Li - MSFT 32,731 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

How to register device on Entra ID programatically

Hi , I want to register my local device to Entra ID using c#. I have gone through the Microsoft Graph API documentation as well but didn't get any information related to this topic please help me.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,446 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.
10,648 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,629 questions
asked 2024-07-09T07:45:18.6466667+00:00
Akesh Jadhav 20 Reputation points
accepted 2024-07-17T05:16:28.3233333+00:00
Akesh Jadhav 20 Reputation points
1 answer

getting error- The request is invalid. Details: Cannot dynamically create an instance of type 'Microsoft.Azure.Search.DataIdentity'. Reason: Cannot create an abstract class.

I am trying to create a custom web api skillset to connect to document intelligence directly. Created a skillset definition but it throws below error - The request is invalid. Details: Cannot dynamically create an instance of type…

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
865 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,400 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.
10,648 questions
Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
1,535 questions
asked 2024-07-11T13:23:08.38+00:00
Amrita Madhav 0 Reputation points
answered 2024-07-16T19:07:04.22+00:00
ajkuma 24,971 Reputation points Microsoft Employee
1 answer

System.Exception: 'Days between ViewStart and ViewEnd should be between 1 and MaximumViewDays' in c#

I want to select multiple days in my monthView1, but the error message say."System.Exception: 'Days between ViewStart and ViewEnd should be between 1 and MaximumViewDays'" and here my code. private void monthView1_SelectionChanged(object…

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.
10,648 questions
asked 2024-06-09T06:50:07.66+00:00
BgnerNprg207 286 Reputation points
answered 2024-07-16T17:51:11.0366667+00:00
Waqar Kabir 1 Reputation point
1 answer

System.ArgumentException: Value does not fall within the expected range.

I am making an Excel Addin in C# in Visual Studio. I have already made another simpler Addin and installed it with no problem. But on this one I am getting the following error: “Name: ExcelAddin_RSMeansV.2 From: file:///C:/Users/jstebbins/Desktop/Excel…

Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,694 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.
10,648 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,720 questions
Microsoft 365 Publishing
Microsoft 365 Publishing
Microsoft 365: Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line. Publishing: The process of preparing, producing, and releasing content for distribution or sale.
606 questions
asked 2023-12-05T03:02:02.8933333+00:00
Joshua S 5 Reputation points
answered 2024-07-16T17:24:06.3666667+00:00
Waqar Kabir 1 Reputation point
2 answers

unusual loading of page

Link where event occurred: https://learn.microsoft.com/en-gb/learn/modules/csharp-write-first/2-exercise-hello-world Line due to which event occurred: /Console.WriteLine("Hello World!"); Suggestion: Editor should show a error…

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.
10,648 questions
asked 2021-09-16T06:21:24.77+00:00
Waqar Kabir 1 Reputation point
answered 2024-07-16T16:55:31.5666667+00:00
Waqar Kabir 1 Reputation point
0 answers

NullReferenceException: Object reference not set to an instance of an object.

I'm using ASP.net mvc. I think there's something wrong with my controller and view. I can't move on with my crud since i'm stuck at the index action. Some help from anyone would be very much appreciated!

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,400 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.
10,648 questions
asked 2024-07-16T05:30:01.9366667+00:00
Zekrom 0 Reputation points
edited a comment 2024-07-16T09:10:26.39+00:00
Zekrom 0 Reputation points
0 answers

Nuget package creation and file removal on uninstall

Hi, I am creating a package for use in dotnet core web applications. Specifically Umbraco 9 CMS. As of recent, it would appear that Powershell scripts are no longer used to populate and remove files on Nuget package installation/ uninstallation with…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,647 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.
10,648 questions
asked 2022-06-10T12:16:43.957+00:00
Adam U 11 Reputation points
commented 2024-07-15T12:43:54.7+00:00
Solomio Sisante 0 Reputation points
3 answers One of the answers was accepted by the question author.

XmlDocument to XmlReader?

Hello I used to load an XML file into an XDocument and keep it intact in memory, then pass it to another object when needed, since it only accepts XmlReader, I was using XDocument.CreateReader. Now am moving from XDocument to XmlDocument, just no idea…

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.
10,648 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,668 questions
asked 2024-07-13T23:12:42.57+00:00
StewartBW 925 Reputation points
commented 2024-07-15T12:37:10.69+00:00
StewartBW 925 Reputation points