10,470 questions with C#-related tags

Sort by: Updated
1 answer One of the answers was accepted by the question author.

C# - lock object - the correct way to use it.

Hello, I am adding and removing items in a list. This can be done by two threads in the same program. The questions are Is one lock element enough or are two necessary? static object LockPackageList = new object(); // or static 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,470 questions
asked 2020-12-11T10:18:37.003+00:00
Markus Freitag 3,786 Reputation points
accepted 2020-12-14T16:47:18.293+00:00
Markus Freitag 3,786 Reputation points
1 answer One of the answers was accepted by the question author.

C# List - list can be filled or taken from two threads

Hello, static object LockPackageList = new object(); void Test1() { lock (LockPackageList) { switch (type) { case L.FiFo: ListPackageLabel.Add(currentPackage); // BlockingCollectionPackage.Add(currentPackage); …

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,470 questions
asked 2020-12-10T12:58:36.933+00:00
Markus Freitag 3,786 Reputation points
accepted 2020-12-14T16:46:00.797+00:00
Markus Freitag 3,786 Reputation points
1 answer

Create a a code in C#

A line connects two points. It is a basic element in graphics. To draw a line, you need two points between which you can draw a line. Digital Differential Analyzer (DDA) algorithm is the simple line generation algorithm which is explained step by step…

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,470 questions
asked 2020-12-11T19:58:14.463+00:00
Ella McGillivray 26 Reputation points
answered 2020-12-14T16:07:48.727+00:00
Ella McGillivray 26 Reputation points
2 answers

source code for Microsoft enterprise library for version 4.0

Hi, I'm looking for the source code of the Microsoft enterprise library version 4.0. MS has published the source code for version 5.0 and 6.0. I have searched a lot on the internet but couldn't found for version 4.0 I cannot use version 5.0 or 6.0…

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,470 questions
asked 2020-12-09T08:49:39.69+00:00
Vicky 1 Reputation point
commented 2020-12-14T12:34:19.35+00:00
Cheong00 3,471 Reputation points
2 answers One of the answers was accepted by the question author.

Microsoft learn: Write data with output bindings

I am following Microsoft Learn path : https://learn.microsoft.com/en-us/learn/modules/chain-azure-functions-data-using-bindings/7-write-data-with-output-bindings-portal-lab?pivots=javascript I am trying to use the input binding for CosmoDB, in…

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,476 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,470 questions
asked 2020-12-12T16:23:05.653+00:00
Michael Guillaume 26 Reputation points
answered 2020-12-14T10:36:15.077+00:00
Michael Guillaume 26 Reputation points
1 answer

GetWindowDesktop Error

I'm writing some code in C# to determine when a user switches virtual desktops in Windows. The only way I can determine to accomplish this is to set a Windows event hook on the EVENT_SYSTEM_FOREGROUND event, then use the…

Azure Virtual Desktop
Azure Virtual Desktop
A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.
1,408 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,470 questions
asked 2020-12-13T02:30:38.463+00:00
Bob Mc 6 Reputation points
commented 2020-12-14T08:44:38.053+00:00
Rita Han - MSFT 2,161 Reputation points
1 answer

How do I create a rectangle using the Line class in c#?

How do I create a rectangle using the Line class in c#? The output of this code should show 4 points all connected together by lines! Please fill in where it says //TODO. Also include the Main() that way it will show the rectangle. Thank you! namespace…

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,470 questions
asked 2020-12-11T19:45:53.18+00:00
Ella McGillivray 26 Reputation points
answered 2020-12-14T06:43:30.903+00:00
Timon Yang-MSFT 9,576 Reputation points
0 answers

Xamarin forms datagrid does not show related data

I am trying to setup the following. A listview that shows a list of daily surgery cases. When a case is clicked it navigates to a content page containing the details for the case as well as a linked datagrid that contains all of the staff (caseStaffJoin)…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,312 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,470 questions
asked 2020-12-12T20:33:53.163+00:00
Ann Brady 1 Reputation point
commented 2020-12-14T06:03:53.757+00:00
JarvanZhang 23,951 Reputation points
1 answer

How to translate this programm to C#??

import java.io.IOException; import java.net.ServerSocket; import java.net.Socket; public class Server { public static ServerSocket socket = null; public static void main(String[] args) { try { socket = 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.
10,470 questions
asked 2020-12-13T19:14:43.687+00:00
flamingo-coder 1 Reputation point
answered 2020-12-14T00:40:43.607+00:00
Abdulhakim M. Elrhumi 351 Reputation points
1 answer

code to open form from toolstrip, same code yet among one code cannot .show();

private void userToolStripMenuItem_Click(object sender, EventArgs e) { frUser user = new frUser(); user.Show(); } private void categoryToolStripMenuItem_Click(object sender, EventArgs e) …

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,470 questions
asked 2020-12-12T13:25:26.6+00:00
Rudi Hartono 116 Reputation points
answered 2020-12-12T13:40:05.017+00:00
Viorel 113.7K Reputation points
2 answers

difference between NETStandard.Library and Microsoft.NETCore.App?

I wanted to know the difference between the NETStandard.Library package and the Microsoft.NETCore.App package. I tried to look up documentation but it's all very broad or they sound very similar saying both packages are a set of .NET API's. Is there a…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,522 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,470 questions
asked 2020-12-12T01:09:58.14+00:00
displayname 1 Reputation point
answered 2020-12-12T09:49:57.557+00:00
Sardou Noureddine 241 Reputation points
2 answers

Ayuda con programación de ComboBox en C#

Hola, muy buenas. Contextualizando un poco, esto desarrollando una aplicación en WF con el lenguaje c#. Ahora bien, estoy desde hace un par de días en una situación que no me deja avanzar. Resulta que dentro del Form tengo un comboBox del cual obtengo el…

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,470 questions
asked 2020-12-09T23:36:20.46+00:00
Jordi 1 Reputation point
answered 2020-12-12T09:23:33.303+00:00
Jabbar Hussain 1 Reputation point
2 answers One of the answers was accepted by the question author.

saving data from 2nd form to the same master table in win form application

I have two winforms where form 1 is used to enter data from first seven fields and other forms is used to enter for last three fields , where i have the table stored in MSSQL server ,Now when i try to save the last three fields i am getting below "…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,863 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,755 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,470 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,575 questions
asked 2020-12-12T06:40:21.617+00:00
ravi kumar 331 Reputation points
answered 2020-12-12T08:36:21.917+00:00
ravi kumar 331 Reputation points
5 answers One of the answers was accepted by the question author.

Sharepoint Online - CSOM search KeyWordQuery document not appear

Hello, I'm doing a search in Sharepoint with CSOM, some documents are missing, otherwise if a do the same search directly over Sharepoint this documents appear.... I already check Query Source, crawled properties, syntax, etc... need help. …

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,002 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,470 questions
asked 2020-12-09T21:46:51.26+00:00
Mauricio Poggio Veiro 301 Reputation points
accepted 2020-12-11T13:15:35.177+00:00
Mauricio Poggio Veiro 301 Reputation points
1 answer

How to validate windows local users using c# ?

Hi, I am using below code to validate but it is working for few users and it is not working for few users.please help me to resolve this issue. public bool ValidatePassword(string userName, string Password, ref string errorMessage) { errorMessage =…

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,470 questions
asked 2020-12-10T06:43:13.1+00:00
venkateswararao 21 Reputation points
answered 2020-12-11T02:52:17.003+00:00
Daniel Zhang-MSFT 9,621 Reputation points
2 answers

How to activate Online Speech Recognition on Single-App Kiosk

Hi, I would like to know how to turn on the Online Speech Recognition on an Single-App Kiosk session ? My goal here, is to be able to access the Touch KeyBoard Speech-to-Text feature through an UWP' application.

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,933 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.
10,470 questions
asked 2020-12-08T08:42:16.313+00:00
Nicsi 1 Reputation point
commented 2020-12-11T02:02:07.217+00:00
Roy Li - MSFT 32,721 Reputation points Microsoft Vendor
3 answers

Console App (Non UWP) with CS/WinRT

Hi I have created a Console App (NonUWP) that use CS/WinRT I was able to access WinRT API like Windows.Devices.Custom but the problem is that await is not working for me, I'm getting errors. i can worked around it using GetResults() but it is…

Universal Windows Platform (UWP)
.NET CLI
.NET CLI
A cross-platform toolchain for developing, building, running, and publishing .NET applications.
324 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,470 questions
asked 2020-11-29T14:37:06+00:00
baget 221 Reputation points
answered 2020-12-11T01:21:40.713+00:00
Manodasan Wignarajah 11 Reputation points
2 answers

Create custom monitor

Hi All, I have a requirement like I have to monitor for one event for maximum 1 minute if the event comes within that time I can continue. Otherwise make it as failed. This I can do using auto reset event. But I have one more requirement if its 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,470 questions
asked 2020-12-09T05:33:11.213+00:00
One07k-4914 101 Reputation points
commented 2020-12-10T09:20:00.243+00:00
Timon Yang-MSFT 9,576 Reputation points
1 answer

Deserialize json using JavaScriptSerializer

Hi, I am trying to parse a json string and write it into a table using JavaScriptSerializer() in SSIS Script Task C#. { "events": [ { "Id": 456895, "Name": "Chelsea - Arsenal", …

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,485 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,470 questions
asked 2020-12-08T23:14:52.293+00:00
Raj D 581 Reputation points
commented 2020-12-10T08:01:44.687+00:00
Timon Yang-MSFT 9,576 Reputation points
1 answer

System.EntryPointNotFoundException: Unable to find an entry point named 'PldaMemoryWrite32' in DLL 'PLDA.dll'.

Hi, I am using C# application with DLL library source code for one of my project. I configured both for 64bt system and tested in windows 64 bit supported board, there it was working fine. But when I configured both for 32 bit system and tested…

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,470 questions
asked 2020-12-08T08:42:24.57+00:00
Aishwarya Bhat 1 Reputation point
commented 2020-12-10T07:05:41.393+00:00
Cheong00 3,471 Reputation points