Microsoft Q&A

C#

6,920 questions

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.

Browse all C# tags

6,920 questions with C#-related tags

Sort by: Updated
0 answers

Generate a simple message from controller (blazor page not for razor view)

In a Blazor server application, I have implemented user authentication via cookie. In the Blazor page (not razor view) I have created a form with email and password entries as well as a button for sending the data. The method is Post and is run on the…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,531 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.
783 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.
6,920 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
582 questions
asked 2023-01-29T12:11:47.5833333+00:00
perfect code 101 Reputation points
commented 2023-01-29T12:42:24.98+00:00
AgaveJoe 16,946 Reputation points
1 answer

Sum Value of data table rows having same cost center rows

Hi Everyone, I need a logic to implement for the below. I have a C# console application. In that, I am generating a report. I have a requirement to sum same rows where first column value is same. I need a generic logic. Number of columns may increase…

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.
6,920 questions
asked 2023-01-29T09:57:18.6766667+00:00
Mohammad Nadeem Alam 21 Reputation points
edited an answer 2023-01-29T12:28:15.68+00:00
Reza Aghaei 2,851 Reputation points Microsoft MVP
2 answers

Reading form fields after submit (POST) in Blazor Server?

I have a login form in Blazor Server App and use POST to send login data (email and password). <form id="LoginForm" Model="LoginModel" action="cookie" method="post"> …

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
876 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.
6,920 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
582 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,531 questions
asked 2023-01-28T19:43:14.55+00:00
perfect code 101 Reputation points
commented 2023-01-29T12:17:10.88+00:00
AgaveJoe 16,946 Reputation points
1 answer

seralize object returns empty file after save

Hello All, Morning: I'm reading a XML file to fill the datagrid have no issues; then i modify the some values in the datagrid then save back to the xml file without changing the structure of the file. When i tried to seralize the file, empty file is…

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.
6,920 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,170 questions
asked 2023-01-26T12:46:59.28+00:00
Kran2022 241 Reputation points
commented 2023-01-29T11:27:55.1766667+00:00
Kran2022 241 Reputation points
1 answer

How to fix Exception while executing Azure function to write into Azure Table Storage

I'm currently trying to create a simple Function with C# writing into Azure Table Storage. Using the learn.Microsoft-Documentation "Connect Azure Functions to Azure Storage using Visual Studio Code" I already built a Function writing in Azure…

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.
6,920 questions
Azure Table Storage
Azure Table Storage
An Azure service that stores structured NoSQL data in the cloud.
117 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
2,577 questions
asked 2023-01-24T11:21:19.12+00:00
Annika Biere 0 Reputation points
commented 2023-01-29T10:53:14.68+00:00
Annika Biere 0 Reputation points
1 answer

How to know if a platform/device will have the required dependencies to run a project?

Hi all, I am learning C# through MS Learn and it's going great so far. My mind does wander to possible issues throughout due to past issues with learning other programming languages like Java and Python. One concern I have is whether or not a project…

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.
6,920 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
599 questions
asked 2023-01-22T21:39:39.31+00:00
AntfeldChristian 0 Reputation points
answered 2023-01-29T06:35:16.4366667+00:00
Castorix31 65,331 Reputation points
0 answers

WPF Mousemove is a noticeable lag

I am making a UserControl called VolumeScrollBar to control the volume a video player I am working on. Now the problem I am having is when I slide my SwitchPath it moves noticeable slower than my mouse. How can I fix this ? note: everything is working…

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.
6,920 questions
asked 2023-01-29T06:16:37.1733333+00:00
Brandon Boone 1 Reputation point
2 answers One of the answers was accepted by the question author.

Where is debug start action options in a C# DLL project for Visual Studio 2022

It seems that with the new interface for "debug profiles UI" in Visual Studio 2022, I can no longer find the start action options…

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.
6,920 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
2,394 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.
694 questions
asked 2022-01-25T20:21:25.81+00:00
Jackie Yang 21 Reputation points
edited an answer 2023-01-28T22:10:07.85+00:00
Reza Aghaei 2,851 Reputation points Microsoft MVP
2 answers One of the answers was accepted by the question author.

Best options for creating modern C# database programs

Hello, I have been using Microsoft Access for a while to create programs for small business activities. I would like to create more modern programs using C# to take advantage of the new Microsoft technologies for the front-end and back-end database. What…

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.
6,920 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.
1,935 questions
asked 2023-01-28T10:14:25.5366667+00:00
Yusuf 616 Reputation points
accepted 2023-01-28T18:33:05.2233333+00:00
Yusuf 616 Reputation points
2 answers

How can I build my code? The button start without debugging is disabled

I looked about 10 youtube installation of VS 2022 films. In all the films the installation was succesfully ended with the openeing of the console window with " Hello World" . Apparently I do something different but I don´t understand…

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.
6,920 questions
asked 2023-01-28T17:43:06.4266667+00:00
Hans Overbeek 0 Reputation points
edited a comment 2023-01-28T18:31:37.5333333+00:00
chikorita 0 Reputation points
2 answers One of the answers was accepted by the question author.

Basic C# Console Application template

I am new to C#. I am confused on how to initiate a C# console application. I tried some examples except none of them seem to work. The format of a C# Console Application has changed a lot recently, so I don't know how to start. Could someone help get me…

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.
6,920 questions
asked 2023-01-28T00:28:52.43+00:00
Marc Menzel 61 Reputation points
edited the question 2023-01-28T18:23:57.6366667+00:00
Reza Aghaei 2,851 Reputation points Microsoft MVP
2 answers One of the answers was accepted by the question author.

Logout (delete Auth-Cookie) only possible via form!

I have a Blazor server application (see my post here: https://learn.microsoft.com/en-us/answers/questions/1164837/aspnet-authentication-works-but-value-for-user-ide). Now I have implemented a cookie authentication. This works very well via a login and…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
876 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,531 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.
783 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.
6,920 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
582 questions
asked 2023-01-28T13:26:22.5033333+00:00
perfect code 101 Reputation points
commented 2023-01-28T17:41:48.8333333+00:00
perfect code 101 Reputation points
1 answer

C# Server, Client, Duplex mode

Hello, I'm looking for a good example to exchange this between server and client. Both should be able to make unsolicited inquiries. Duplex operation. Who can help me, who can post a good example? IP="127.0.0.1" Port="8029" …

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.
6,920 questions
asked 2023-01-28T10:20:44.1266667+00:00
Markus Freitag 2,961 Reputation points
commented 2023-01-28T17:09:39.1633333+00:00
Markus Freitag 2,961 Reputation points
1 answer

How to give user to only access his user profile and block other all folders for him in windows 10

Anyone know how to give user to only access his user profile and block other all folders for him in windows 10

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.
6,920 questions
Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
5,905 questions
Access
Access
A family of Microsoft relational database management systems designed for ease of use.
22 questions
asked 2023-01-28T09:10:16.23+00:00
Janith Sahasra 6 Reputation points
answered 2023-01-28T13:25:49.77+00:00
RLWA32 28,531 Reputation points
4 answers One of the answers was accepted by the question author.

C# Events and Delegates - when should I take what?

Hello, I'm looking for a correct way to handle events and delegates. Do you have a good overview, a good example? When is an event enough, when do I have to switch to delegates? If I trigger an event and want to pass a complete object, then I need 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.
6,920 questions
asked 2023-01-23T18:28:06.5433333+00:00
Markus Freitag 2,961 Reputation points
edited a comment 2023-01-28T11:29:15.6666667+00:00
Markus Freitag 2,961 Reputation points
1 answer One of the answers was accepted by the question author.

How to ignore ETag checking and fix this error

I read from and write to blob content in Azure blob storage. File is being changed (new content is getting appended to the file) at the same time while it is being downloaded. I get error in the below stream.Read() line. Which I believe is because of…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,531 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.
783 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.
6,920 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
1,388 questions
asked 2023-01-18T12:50:17.69+00:00
Sarah 151 Reputation points
accepted 2023-01-28T07:59:17.6133333+00:00
Sarah 151 Reputation points
1 answer

Intent Filter / DeepLink .Net MAUI

I want to implement an application that will be viewable in my application using Intent Filter. I added in the MainActivity.cs file Filter Intent [IntentFilter(new[] { Intent.ActionView }, Categories = new[] { Intent.ActionView, Intent.CategoryDefault,…

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.
6,920 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
876 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
599 questions
asked 2023-01-19T14:47:27.51+00:00
Влад Тигинян 0 Reputation points
accepted 2023-01-28T06:09:21.7566667+00:00
Влад Тигинян 0 Reputation points
2 answers One of the answers was accepted by the question author.

How to read a file from external server

Hi I want to read csv file from the following URL (display only rider name) [http://www.votrecourse.com/medias/xml/?C=M;O=D/] file name = timetrial.csv pls help me in this.

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.
6,920 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
1,825 questions
asked 2023-01-26T06:41:49.8066667+00:00
Ramesh Sunderasan 20 Reputation points
commented 2023-01-28T02:40:57.19+00:00
Ramesh Sunderasan 20 Reputation points
1 answer

UWP CreateOutputReport failed to create report ID

The following code has an error, System. Exception: "The data is invalid. The specified report type is not present. What is the reason? Error statement: var outputReport = hiddevice.CreateOutputReport(0);  The handle was opened, but the output…

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.
6,920 questions
Universal Windows Platform (UWP)
asked 2023-01-13T03:54:22.5666667+00:00
yu chen 0 Reputation points
edited an answer 2023-01-28T02:26:15.0166667+00:00
yu chen 0 Reputation points
2 answers

Problem querying JSON using LINQ when there are semicolons in the name tag

I'm trying to work with a Json file from an outside source. They put semicolons and additional data in some the field names. I'm trying to query the data using LINQ and having problems. Is there a way of specifying wildcards in LINQ queries? I'm…

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.
6,920 questions
asked 2023-01-27T09:11:06.9366667+00:00
Richard Rosenheim 1 Reputation point
answered 2023-01-27T23:30:37.2133333+00:00
Richard Rosenheim 1 Reputation point