Category "c++sharp"

Return sql command in C#

how should i return this command in c# ? SELECT COUNT(id_pac) AS Expr1, data FROM programare GROUP BY data private void button1_Click(object sender, EventA

C# MongoDB Driver 2.15.0 unable to execute In Query with Linq

I am trying to get my resultset from MongoDB. I need to use In filter here. Here is my code that tries to get data. IMongoCollection<VaersVax> vaersVaxCol

Issue with DependencyProperty binding

I created a small File Browser Control: <UserControl x:Class="Test.UserControls.FileBrowserControl" xmlns="http://schemas.microsoft.com/winfx/2

BlockingCollection with ConcurrentQueue still remain object after GetConsumingEnumerable

I have 2 threads, one is put data to IBlockingColection, and the second read it then send to kafka. My application is asp.net core api. public class ConcurrentQ

How can I handle OnSuspending with WinUI 3

This time I must migrate an UWP App to WinUI 3, so far everything has worked well except for a few small things but the event OnSuspending is simply not trigger

C# linq remove duplicates from the top and bottom of the list and keep the duplicates in the middle

C# linq remove duplicates from the top and bottom of the list and keep the duplicates in the middle For example, var myArray = new[] { 1, 1, 2, 2, 3, 4,

How to find the boundary of close points in .net?

I have many points and I can draw it in a image. there will be many many points . what I want is to find the points is closely. and may be there will be two clo

How to get all children of object recursive with level set to go through?

using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; public class GetChilds : MonoBehaviour { public List<T

How can I try/catch an exception for a negative number in c#?

My program is simply a square root I take an integer from the user in a TextBox and give the result using the function Math.Sqrt in the other TextBox. What I am

Scrape data from div in Windows.Form

I am new in c# programming. I am trying to scrape data from div (I want to display temperature from web page in Forms application). This is my code: private voi

How to retrieve firstordefault from a ToList in linq

I have the following table in sql I am trying to select all records with a status of onboard, but however you can see thatfor user '43d658bc-15a7-4056-809a-5c

Change DataGrid column visibility (WPF, MVVM)

I just recently started learning MVVM. I hope that a solution to this problem will come. In my application, the user is authorized in the system, after which a

Delete obsolete reported properties from Azure iot edge module Twin

I am still rather inexperienced to Microsoft Azure iotedge (and stackoverflow - this being my first post) and how module twins work and have an issue regarding

C# cannot use params object[] instead of __arglist

I am trying to call an unmanaged dll. While looking for information about this and trying it, I thought I could use params object[] instead of __arglist , so I

Unity: Assign instance of abstract object in the inspector

In my game, I have a magic system that uses a command-pattern to store the steps. How can I assign an abstract command not derived from MonoBehavior or Scriptab

Synchronous JavaScript calls with CefSharp

I have to modify a project (C#) that uses CefSharp to automate a web task. Each time the code needs to execute a piece of Javascript, it uses: browser.ExecuteSc

Using Xamarin.Forms and C#, how to connect via bluetooth to Arduino and receive message?

I'm looking all over the place, and I can't find a description of how to do this that I understand... I have to make an Android app in Xamarin.Forms, that conne

Unexpected question signs in output of example code from Microsoft's page about IFormatProvider.GetFormat(Type)

I was reading about the IFormatProvider.GetFormat(Type) method on Microsoft.com, and decided to run the example code provided on the page. Instead of this outpu

How do I change the date format when editing a date in a WPF Datagrid

Whenever I change a date in my WPF datagrid, it try's to convert my input to MM-dd-yyyy. XAML <Grid> <DataGrid x:Name="datagrid" AutoGenera

Hot Chocolate GraphQL SyntaxNode

In the Hot Chocolate GraphQL, OnError method, i can see(in VS watch during debug) the SyntaxNode which show me the request body.how i get it value. because it i