Questions tagged [c#]

C# (pronounced "see sharp") is a high level, statically typed, multi-paradigm programming language developed by Microsoft. C# code usually targets Microsoft's .NET family of tools and run-times, which include .NET, .NET Framework and Xamarin among others. Use this tag for questions about code written in C# or about C#'s formal specification.

0
votes
0answers
9 views

C# mulit-thread for-each slows down main thread

I have a 2D array data structure, and perform work on slices of the data. There will only ever be around 1000 threads required to work on all the data simultaneously. Basically there are around 1000 &...
0
votes
0answers
10 views

Where do I store important api keys in a blazor server app?

I have a blazor server app and I need to know here to store some important info for my app, in the appsettings.json, a .resx file? or somewhere else?
0
votes
0answers
5 views

How to write this mongo query into C#

I need to perform group by with max operator in mongo db. I figure out the query which is working in mongo database but not able to write same using c#. db.getCollection('Employee').aggregate( [ ...
1
vote
0answers
14 views

ASP.NET 6 Reference parent and child from same table

I am attempting to use Data Annotations in one of my classes like it was used in this question: FK to the Same Table Code First Entity Framework . I want to be able to reference the previous and next ...
0
votes
1answer
11 views

Global error handling doesn't work in WPF

I want to handle all unexpected errors in a WPF application. When I look at, there are different events for different situation to capture and control error. Also I added these in application ...
0
votes
0answers
9 views

Move First Prefab Index of specific Panel, to Last index of another Specific panel?

10 Panels, each with 4 index(1 column), 8 are filled panels and two are empty , I wrote one script to access each index for each panel, Question how can I move first index prefab of a specific panel, ...
0
votes
0answers
22 views

How to filter Spam with non-ASCII characters in C#?

my problem is about a spam that I have been recieving almost every day, from different emails address(obviusly). I have coded a program in C# that allows a costumer to send a message, which is stored ...
0
votes
0answers
10 views

OpenXML Header to In-Memory Document

I am trying to extract the header from an OpenXML Word Document then insert this header into the MainDocumentPart of a temporary in-memory OpenXML document so that I can convert it to HTML using ...
0
votes
0answers
14 views

Xamarin: Сan't get data from the site

I'm trying to get information from the site. To do this, I request the entire page as a string, and then just look for the necessary info. But unfortunately, I can't do it from the site I need. In the ...
0
votes
0answers
8 views

How to initialize ViewModel in OnParametersSet?

ViewModel: public record Query {     public int PageNumber { get; set; }     public int PageSize { get; set; } } public class MyViewModel : ReactiveObject {     [Reactive]     public int PageNumber { ...
0
votes
2answers
19 views

Cast from base generic type to derived generic type where the derived type has additional type constraints

Actually whilst casting would be the ideal even "newing up" the derived type would work in my specific scenario. I suspect this isn't possible when I don't have access to the concrete type ...
0
votes
0answers
6 views

Deploy WPF Application with .NET Runtime already within to avoid user having to download it by itself?

I'm developing a WPF App (using .NET CORE). But everytime I have to install it in a computer that doesn't have .NET Runtime installed, it opens a dialog box in installation asking for the user to ...
-1
votes
1answer
38 views

Adding two arrays asynchronously

I am fairly new to asynchronous programming; I am developing a program that deals with numbers in different bases and I want to make the addition method asynchronous. Firstly, it computes the linear ...
0
votes
0answers
8 views

Why can't I successfully bind a DataGridviewColumnCollection to a ComboBox.DataSource and specify a Display/ValueMember?

While trying to bind a combo up so that the user can select a column name from the dropdown and I retrieve the column index from the SelectedValue, I noted that the combo appears to ignore the given ...
0
votes
0answers
5 views

MSI Installer - prerequsities are installing, even when the product is already installed

I had a problem with Sql Compact Edition SDK. It disappeared from web, so i had to create my own ClickOnce Bootstrapper package (for that I've used software called Bootstrap generator). And its almost ...

15 30 50 per page
1
2 3 4 5
101234