Microsoft Q&A

C#

6,934 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,934 questions with C#-related tags

Sort by: Updated
2 answers

How to get comma separated values as an array from a string?

We are using XSLT 1.0 mapping to transform one xml file to another xml. We need to transform comma separated string into sequence of parent-child elements as below. Input String Expected Output Please advise on this. Thank You.

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,934 questions
asked 2023-01-24T09:33:13.94+00:00
Gayara Kumari 0 Reputation points
edited an answer 2023-01-30T15:43:04.35+00:00
Yitzhak Khabinsky 19,851 Reputation points
1 answer

Could not resolve type with token 01000021 from typeref

I am trying to create virtual appointments based on this documentation: https://learn.microsoft.com/en-us/graph/api/application-post-onlinemeetings?view=graph-rest-1.0&tabs=csharp Here is my code: InteractiveBrowserCredentialOptions…

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,934 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
567 questions
asked 2023-01-19T17:52:56.6433333+00:00
Dmitriy Reznik 206 Reputation points
commented 2023-01-30T15:39:07.2733333+00:00
Michael Taylor 37,616 Reputation points
2 answers

fileupload emty error !!!

Hello friends, if the file upload is empty SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["Holding_DB"].ConnectionString); con.Open(); SqlCommand cmdSelect = new…

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,934 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,181 questions
ASP.NET Web Forms
ASP.NET Web Forms
A part of the ASP.NET web application framework that can be used to create ASP.NET web applications.
397 questions
asked 2023-01-30T11:57:08.06+00:00
kadir koçaslan 0 Reputation points
edited a comment 2023-01-30T15:31:53.7033333+00:00
AgaveJoe 17,021 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…

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,172 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,934 questions
asked 2023-01-26T12:46:59.28+00:00
Kran2022 241 Reputation points
commented 2023-01-30T15:15:15.97+00:00
Peter Fleischer (Freelancer) 17,406 Reputation points
1 answer

SAML Toolkit for C# and ASP.NET

Is there any SAML Toolkit for C# and ASP.NET? I want to integrate SAML 2.0 into my existing ASP.NET application. I have done the research for plugins/toolkits for. NET. I haven't found any from Microsoft. Please help me on 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,934 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,181 questions
asked 2023-01-30T13:25:03.8966667+00:00
Sai Kiran Naidu 0 Reputation points
answered 2023-01-30T13:47:19.77+00:00
Telen Wang 245 Reputation points
1 answer

How can I set environment name without building every time?

I need to set custom environment names for builds that gets deployed to different servers. From looking at official documentation and other answers elsewhere, the recommended option is to pass environment name as an argument while calling dotnet publish…

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,934 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
609 questions
asked 2023-01-30T06:30:06.68+00:00
Francis, Aswin 0 Reputation points
edited an answer 2023-01-30T13:46:36.57+00:00
Reza Aghaei 3,011 Reputation points Microsoft MVP
1 answer

I can't use blend for visual studio 2022 to edit axaml

Hello, I'm studying Avalonia UI to migrate my wpf app. so, I created Avalonia mvvm project and open it in blend for VS 2022. I got a following error message: " No editor 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.
6,934 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,398 questions
asked 2023-01-30T04:20:54.6733333+00:00
c00012 691 Reputation points
commented 2023-01-30T13:20:35.7133333+00:00
c00012 691 Reputation points
1 answer

Could not resolve type with token 01000021 from typeref

I am trying to create virtual appointments based on this documentation: https://learn.microsoft.com/en-us/graph/api/application-post-onlinemeetings?view=graph-rest-1.0&tabs=csharp Here is my code: InteractiveBrowserCredentialOptions…

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,934 questions
Microsoft Graph SDK
Microsoft Graph SDK
A Microsoft software developer kit designed to simplify building high-quality, efficient, and resilient applications that access Microsoft Graph.
724 questions
Microsoft Graph Identity API
Microsoft Graph Identity API
A Microsoft API to access Azure Active Directory (Azure AD) resources to enable scenarios like managing administrator (directory) roles, inviting external users to an organization, and, if you are a Cloud Solution Provider (CSP), managing your customer's data.
257 questions
Microsoft Graph Applications API
Microsoft Graph Applications API
A Microsoft API that enables you to manage these resources and actions related to applications in Azure Active Directory.
426 questions
asked 2023-01-19T17:49:10.1166667+00:00
Dmitriy Reznik 206 Reputation points
commented 2023-01-30T13:05:56.2+00:00
Dmitriy Reznik 206 Reputation points
0 answers

Azure.RequestFailedException: Failed to process task after several retry Status: 200 (OK) ErrorCode: InternalServerError

Hi everyone, I have an issue with PII Recognition document A: only hindi characters nमेर चैनल म ूज और सद नह बढ़ रह ह" document B: (english characters, emoji, hindi characters) 1/12/23, 1:54 PM YouTube Community\nView all posts\nWatch and…

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,934 questions
Azure Cognitive Services
Azure Cognitive Services
A group of Azure artificial intelligence services and cognitive APIs that help build intelligent apps.
936 questions
asked 2023-01-30T09:12:22.68+00:00
Mason Nguyen 0 Reputation points
commented 2023-01-30T12:29:55.5966667+00:00
romungi-MSFT 27,006 Reputation points Microsoft Employee
1 answer One of the answers was accepted by the question author.

How can I use WeakReferenceMessenger instead of MessagingCenter in my iOS project?

I get the following message when I use MessagingCenter in my .NET 7.0 iOS project: [deprecated] class Microsoft.Maui.Controls.MessagingCenter Associates a callback on subscribers with a specific message name. CS0618: 'MessagingCenter' is obsolete: 'We…

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,934 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
885 questions
asked 2023-01-29T16:30:19.28+00:00
Kim Strasser 341 Reputation points
commented 2023-01-30T12:25:32.74+00:00
Kim Strasser 341 Reputation points
0 answers

'UILocalNotification' is obsoleted on: 'ios' 10.0 and later (Use 'UserNotifications.UNNotificationRequest' instead.)

I want to receive and display push notifications on my iPhone/iPad but I get the following message in Visual Studio for Mac: 'UILocalNotification' is obsoleted on: 'ios' 10.0 and later (Use 'UserNotifications.UNNotificationRequest' instead.) I use .NET…

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,934 questions
asked 2023-01-30T12:24:14.4933333+00:00
Kim Strasser 341 Reputation points
0 answers

asp.net c# news and details

hello everyone, I have a news page on my website, but when I add news, the image title and text appear. How can I add news as seen in the example I would appreciate your help

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,934 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,181 questions
asked 2023-01-18T08:05:26.5866667+00:00
kadir koçaslan 0 Reputation points
commented 2023-01-30T12:16:37.5766667+00:00
kadir koçaslan 0 Reputation points
4 answers

Contact Us form

Hello I am creating a contact us form The idea here is that people contact, the developer (me), with a bug or future request So, the user will type his/her email, and some comments will be sent to my personal email address. private static void…

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,934 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,172 questions
asked 2023-01-23T22:52:02.8166667+00:00
Eduardo Gomez 2,326 Reputation points
answered 2023-01-30T11:57:41.0966667+00:00
Karen Payne MVP 29,236 Reputation points Microsoft MVP
0 answers

CastingDevicePicker doesn't find the emulator

I want to stream video to the remote device in UWP C#. I use a MediaElement and CastDevicePicker. I did everything following the article - https://learn.microsoft.com/en-us/windows/uwp/audio-video-camera/media-casting. CastDevicePciker doesn't find the…

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,934 questions
Universal Windows Platform (UWP)
asked 2023-01-30T11:48:52.72+00:00
Denys Huska 0 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,934 questions
asked 2023-01-28T10:20:44.1266667+00:00
Markus Freitag 2,961 Reputation points
commented 2023-01-30T11:39:42.54+00:00
Markus Freitag 2,961 Reputation points
0 answers

C# TCP/IP, Client with reconnect and timeout

Hello, I am looking for a good example how to create a client. There should be a timeout if no connection could be created. Then until 3 times automatic retry. If there is no response after the request, there should be error message, timeout. The request…

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,934 questions
asked 2023-01-26T16:59:17.22+00:00
Markus Freitag 2,961 Reputation points
commented 2023-01-30T11:38:28.3066667+00:00
Markus Freitag 2,961 Reputation points
3 answers One of the answers was accepted by the question author.

c# use tablename as variable

How can i use tablename as a variable in sql query? "select * from table_name " table_name must be variable.

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,934 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,536 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.
8,483 questions
asked 2023-01-30T06:44:59.1066667+00:00
ÖMER NASUHİ KESKİN 0 Reputation points
accepted 2023-01-30T11:06:25.29+00:00
ÖMER NASUHİ KESKİN 0 Reputation points
2 answers One of the answers was accepted by the question author.

In WPF, I want to handle the start and end of Resize like WinForms

I need an event in WPF which can tell me when does the window's border stop being dragged, because I can't run my large code every time SizeChanged event triggers.

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,172 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,934 questions
Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,316 questions
asked 2023-01-29T14:12:29.06+00:00
尼龟 杰 0 Reputation points
commented 2023-01-30T10:02:25.4266667+00:00
Reza Aghaei 3,011 Reputation points Microsoft MVP
0 answers

When Wpf datagrid apply group, the application becomes very slow.

My wpf application is build with .net framework 4.5.2, when datagrid apply group, in some computers the wpf application becomes very slow, but other computers do not have this problem. If the wpf application build with .net framework 4.8, all computers…

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,934 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
609 questions
asked 2023-01-30T09:35:18.2+00:00
luckyy 0 Reputation points
edited the question 2023-01-30T09:38:06.95+00:00
luckyy 0 Reputation points
0 answers

change selection picturebox by Next button c#

i want to create box or square or rectangular in grid view with button. Then another button (Next, Left, Right, Up, and Down) will change the selection based on button click. if no selection was made, (0, 0) box will be selected. Selected box will…

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,934 questions
asked 2023-01-30T07:42:25.4566667+00:00
jundullah 007 0 Reputation points
edited a comment 2023-01-30T09:08:30.7766667+00:00
jundullah 007 0 Reputation points