47 questions from the last 7 days
-7
votes
0
answers
65
views
How to group dictionary of same hours by consecutive day that changes [closed]
I have a dictionary of type Dictionary<string, string>, each item of which has the day of week as the key, with the hours of operation as the value. The items might look like this:
[0] {[Sun,...
-1
votes
0
answers
55
views
WPF C# thermal printer job stuck in print queue after app is idle/minimized, works only after app restart
Question
I have a C# WPF desktop application that prints invoices to a thermal printer using the Custom Print Queue (ESC/POS–style printing).
Issue:
If the application is idle or minimized for ~10 ...
-1
votes
0
answers
63
views
Is it possible to display the parameters from the Json before I use JsonSerializer.Deserialize?
How can I display the function parameters(SessionTicket, Deviceid, Loginemail, Language) in Azure portal when I call my Azure function? I just want to find out if the function parameters are correct ...
0
votes
1
answer
69
views
C# Error CS9293: Cannot use an extension parameter in this context
I'm experimenting with the new C# 14 extension syntax in .NET 10, and I hit an error I can't find documentation for:
public static class Foo
{
extension(int bar)
{
public static int ...
-1
votes
0
answers
65
views
How to bind SelectedItems in ListBox to ViewModel [duplicate]
I have a ListBox
<ListBox
BorderBrush="Transparent"
FontSize="{Binding ExplorerElementsHeight}"
ItemsSource="{Binding CurrentExplorerContent}"
...
-1
votes
0
answers
70
views
Azure Functions: Failure Type: Exception: System.Text.Json.JsonException: The input does not contain any JSON tokens
I get the following exception when I use JsonSerializer.Deserialize in my Azure function. I created a small Azure function for testing purposes and it always fails with the same exception. Is it not ...
-5
votes
0
answers
90
views
GetStreamAsync CopyTo sometimes returns zero bytes [closed]
I have the following routine that downloads a file from a web server. Sometimes the local file is created, but is zero bytes. I am [almost] certain the remote resource exists.
private static void ...
Advice
0
votes
1
replies
40
views
How to properly call a Nethereum smart contract overloaded function
Ran into this challenge, interacting with a smart contract that I had deployed to Polygon Amoy testnet. There are two functions for safeTransferFrom. Which is the preferred way to move an ERC-721 ...
1
vote
0
answers
69
views
Visual Studio Test Explorer hangs indefinitely on .NET 10 xUnit project, but dotnet test passes
Problem Description: I am working on a simple console application (Advent of Code) using .NET 10. I have set up an xUnit test project.
The Issue: When I try to run tests in Visual Studio's Test ...
1
vote
0
answers
69
views
CapsuleCast sometimes does not work when driving on an inclined plane
I’m trying to move horizontally with the following code:
Vector3 Move(Vector3 dir_movement, Vector3 position, int i)
{
if (i > maxi)
{
return Vector3.zero;
}
float ...
-1
votes
0
answers
74
views
An published app built on MAUI on Google Play doesn't start: how to fix it?
I have my NET10 MAUI application and I try to publish the app on the Google Play Store. I published and updated the app a few times but I often face an issue.
When I test the app in Debug mode on my ...
0
votes
1
answer
59
views
NLog 6.0.7 Multiple archives created in multi-process logging setup
I have a multi-process application (one orchestrator and multiple workers) where all processes write to the same log file using NLog 6.
The log file is configured to be archived:
daily (ArchiveEvery=...
-1
votes
0
answers
27
views
How to share classes/records with `Microsoft.AspNetCore.Mvc.FromQuery` attribute across .NET MAUI client and ASP.NET server projects? [duplicate]
The following class:
public abstract record TasksTransactions
{
public abstract record RetrievingOfSelection
{
public const string URN_PATH = "/api/tasks/selection";
public ...
Best practices
1
vote
8
replies
144
views
How do you manage multiple if statements?
I am currently coding a project with many if statements to check certain values. I feel like all those statements seem inefficient and time-consuming in my program. How can I optimize or manage this ...
0
votes
0
answers
42
views
Avalonia library DataGrid not showing rows
I'm trying to create an Avalonia control to be used in a library. The control is meant to be directly bindable to a DataTable and display the contents in a grid with TextBoxes above each column to be ...