10,626 questions with C#-related tags

Sort by: Updated
0 answers

Get SCCM Software Center Applications using CIMSession

UPDATE : @TimonYang, First of all thank you for your quick reply! Regarding to the error, if you didn't import the required reference yet, you should import it from : …

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,626 questions
asked 2020-12-02T13:08:50.133+00:00
Torres Joao 1 Reputation point
commented 2020-12-03T11:15:54.107+00:00
Torres Joao 1 Reputation point
0 answers

HttpWebRequest.BeginGetResponse method

Hello. I have carefully read the code example at https://learn.microsoft.com/ru-ru/dotnet/api/system.net.httpwebrequest.begingetresponse?view=net-5.0#----------- and tried to run it. It worked fine, but i wanted to test TimeoutCallback (when…

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,626 questions
asked 2020-12-02T11:50:44.64+00:00
Maxim Bulatov 1 Reputation point
commented 2020-12-03T09:51:31.777+00:00
Timon Yang-MSFT 9,586 Reputation points
2 answers One of the answers was accepted by the question author.

Avoid "src" in autonamatic namespace

Hello, is still necessary to have "src" included in automatic namespace? I found this topic was solved years ago here: …

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,870 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,626 questions
asked 2020-12-02T08:44:39.22+00:00
Radim Langer 101 Reputation points
accepted 2020-12-03T08:26:24.62+00:00
Radim Langer 101 Reputation points
1 answer One of the answers was accepted by the question author.

question about Static method/class with where T : class,new(), what does it mean

Hi I am studying an example project and one class is like this: public class ClassDB<T> where T : class,new(), { public static IEnumerable<T> ExecuteGetList(T whereModel) } And in another class(classA) , the code 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.
10,626 questions
asked 2020-12-03T07:49:24.393+00:00
Martin Wang 106 Reputation points
commented 2020-12-03T08:24:46.667+00:00
Martin Wang 106 Reputation points
2 answers One of the answers was accepted by the question author.

Direct access to object properties from another window without creating a new window

Hi First and foremost, I apologize for my grammatical errors; my first language is Persian (Iran). In my project (WPF) i have many windows. in window form i have no problem to access object property from Another window With following codes for…

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,710 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,626 questions
asked 2020-12-01T15:10:55.083+00:00
رضا جافری 1,296 Reputation points
accepted 2020-12-03T03:58:38.64+00:00
رضا جافری 1,296 Reputation points
2 answers

Deserialize json which has a string and complex object

Hi, I am trying to deserialize a json string and write its content into a datatable. I have the following json string with either a string or custom object and not sure how to parse between the string and custom object to write data to the datatable.…

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,626 questions
asked 2020-12-02T03:34:39.073+00:00
Raj D 586 Reputation points
answered 2020-12-03T02:50:06.317+00:00
Daniel Zhang-MSFT 9,621 Reputation points
0 answers

An unhandled exception of type 'Microsoft.UpdateServices.Administration.WsusInvalidServerException' occurred in Microsoft.UpdateServices.Administration.dll

An unhandled exception of type 'Microsoft.UpdateServices.Administration.WsusInvalidServerException' occurred in Microsoft.UpdateServices.Administration.dll

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,626 questions
asked 2020-12-02T09:29:03.82+00:00
Mohammad Musharaf 1 Reputation point
commented 2020-12-03T02:39:10.79+00:00
Timon Yang-MSFT 9,586 Reputation points
1 answer One of the answers was accepted by the question author.

C# remove all new line and blank line

Example of Text file: test1 Test2 Test3 Test4 Expectation: I wanted to first remove all double or more blank line and replace them with a single blank line then register the number shown on the last line as a variable. Test1 Test2 Test3…

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,626 questions
asked 2020-12-02T07:08:03.227+00:00
Tub Ntxawg Yaaj 121 Reputation points
accepted 2020-12-02T16:13:56.75+00:00
Tub Ntxawg Yaaj 121 Reputation points
1 answer One of the answers was accepted by the question author.

What Is The Optimal Solution When There Is Incompatibility Between Google Chrome Driver & Google Chrome Browser

Error - " System.InvalidOperationException : session not created: This version of ChromeDriver only supports Chrome version 85 (SessionNotCreated)" Version Of Google Chrome I Am Using: Version 87.0.4280.66 (Official Build) (64-bit) …

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,626 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.
337 questions
asked 2020-11-28T09:49:16.223+00:00
O.A 41 Reputation points
commented 2020-12-02T16:02:13.75+00:00
O.A 41 Reputation points
2 answers

Read the content of zip folder

Hi All, I have a zipped folder called 'Uploadfiles.zp'. This folder contains folders like: 5.6/Proj , 5.6/PDS, 13/Proj, 13/PDS I have to read Uploadfiles.zp folder and check if the folder structure is in the expected format or not. What is 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.
10,626 questions
asked 2020-12-02T07:22:37.077+00:00
Santosh Umarani 81 Reputation points
answered 2020-12-02T12:00:46.403+00:00
Karen Payne MVP 35,386 Reputation points
2 answers One of the answers was accepted by the question author.

UDP Socket wont receive data on android

I have an issue with UdpClient.Receive(ref IPEndpoint) on android devices: for some reason the same code works on PC, but android devices (or emulators) have a 50% chance to get stuck on Receive() method. It doesn't depend on networking type (wired,…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,326 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,626 questions
asked 2020-12-01T08:10:31.997+00:00
Я есть 96 Reputation points
accepted 2020-12-02T07:05:10.393+00:00
Я есть 96 Reputation points
1 answer One of the answers was accepted by the question author.

Simple Question : How to retract value from JSON data??

Hi there, I have a JSON sample data as the shown below: {"i:0#.w|my\jeffw":{"DateTime":"/Date(1604906464292)/", "LoginName":"SHAREPOINT\system"}, …

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,626 questions
asked 2020-12-01T14:18:57.857+00:00
Will 616 Reputation points
accepted 2020-12-01T15:55:49.403+00:00
Will 616 Reputation points
0 answers

HTTP Error 500.30 - ANCM In-Process Start Failure

Hello everyone, I am struggling with this problem for almost 5 days now. Getting this error as soon as I launch my web api solution in Google Chrome. The solution is built with .NET Core 3.1 . Event Log shows: Application ... with physical…

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,626 questions
asked 2020-11-30T12:10:18.037+00:00
Saad Masood 1 Reputation point
commented 2020-12-01T09:20:41.617+00:00
Timon Yang-MSFT 9,586 Reputation points
1 answer One of the answers was accepted by the question author.

windows 2016 steps into future for half hour at 23:00 CET and then returns to normal

I have asp.net core 3.1 program with a very basic async socket receiver and a blazor webassembly frontend. Every half an hour a machine sends a report (+/- 1000 bytes) to it, which is then stored to sqlserver and to a file on disk. Al thru the day this…

Windows Server 2016
Windows Server 2016
A Microsoft server operating system that supports enterprise-level management updated to data storage.
2,430 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,626 questions
asked 2020-11-19T07:54:14.247+00:00
Anonymous
commented 2020-12-01T07:03:51.523+00:00
Jenny Yan-MSFT 9,336 Reputation points
1 answer One of the answers was accepted by the question author.

How to get info from xaml file in C#

Hello. In my C# program I want to know how to read this file: <!-- Info.xaml --> <Credentials Username="UsernameHere" Password="PasswordHere"/> and get the Username's value and put it in a string, how can I do 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.
10,626 questions
asked 2020-12-01T01:25:52.857+00:00
A N 81 Reputation points
commented 2020-12-01T04:02:04.15+00:00
A N 81 Reputation points
1 answer

Use Microsoft CNG library to load key from KSP and use it to initiate two-way-ssl mutual authentication

I have to connect to a backend service that is secured using two way ssl. The certificate I use for this handshake resides in an HSM. I've installed the HSM providers KSP software. I'm using Microsoft's CNG library to lookup certificate generated in…

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,626 questions
asked 2020-11-17T16:57:49.983+00:00
DV 6 Reputation points
commented 2020-12-01T03:24:15.54+00:00
Jambor Yao 6 Reputation points
1 answer

Xamarin.Forms: UWP UI Binding errors that aren't real errors?

In my Xamarin.Forms app every ListView in UWP is rather slow in creating the cells, or entries, or rows, or whatever they're called. On Android and iOS the ListView scrolls as fast as you can make it go, but on UWP after a short fast scroll the list…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,326 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,626 questions
asked 2020-11-26T10:34:50.107+00:00
it-neX 1 Reputation point
answered 2020-11-30T12:13:54.723+00:00
Simon Dallmair 1 Reputation point
0 answers

Can we use script-src 'self' 'unsafe-inline' in the content security policy of the .net application?

In our asp.net SharePoint application, we have used script-src 'self' 'unsafe-inline' in the content security policy as sharepoint is generating some inline javascript code dynamically at runtime. But CSP validator showed red flag for using…

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,626 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,596 questions
asked 2020-11-27T10:44:09.65+00:00
MSUser V 1 Reputation point
commented 2020-11-30T08:33:19.533+00:00
Baker Kong-MSFT 3,796 Reputation points
4 answers One of the answers was accepted by the question author.

How do we find very first closest value from the list of values linq C#

I have the list of values. like below. I am struggling to get very first closest values from the list. How do we get this...? For example, i have the list below. list<double> data1 = {1000, 2000, 3000, 4000, 100, 350, 600, 800, 200, 300, 400,…

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,626 questions
asked 2020-11-27T04:34:11.17+00:00
BeUnique 2,112 Reputation points
commented 2020-11-30T07:51:16.757+00:00
BeUnique 2,112 Reputation points
1 answer

c# remote development from windows visual studio like c++ linux console?

Is there a way in existing VS2019 to have a dotnet c# project be compiled and debugged on a linux host from a project template in Windows like the template for " c++ linux console"? Project on windows, sources and build copied to linux…

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,626 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.
966 questions
asked 2020-11-26T19:39:57.99+00:00
mwx 41 Reputation points
answered 2020-11-30T06:36:02.89+00:00
Tianyu Sun-MSFT 29,351 Reputation points Microsoft Vendor