Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
114 views

Blazor supports virtualization but items need to have same height. For most cases it's okay, but for example for chats where amount of messages can be high and messages have different heights due to ...
GeorgeKarlinzer's user avatar
1 vote
0 answers
61 views

I am working on a .NET MAUI project targeting .NET 8 for both Android and iOS. The app builds and runs fine in debug mode on both platforms, and I can test it locally in the simulators without issues. ...
Suhas M R's user avatar
1583 votes
19 answers
630k views

In most programming languages, dictionaries are preferred over hashtables. What are the reasons behind that?
Nakul Chaudhary's user avatar
2 votes
1 answer
204 views

I have a library with TargetFrameworks set to netstandard2.0;net462;net6.0;net8.0. I want to run tests: netstandard2.0 version on net462, net481, net6.0, net7.0, net8.0, net9.0 net462 version on ...
Athari's user avatar
  • 33.9k
1 vote
3 answers
136 views

Syncfusion Dockingmanager, WPF C# App, all packages at latest version After successful adding a custom caption button to a Dockingmanager window, I'm not able to right align (or right place) it, just ...
user3262353's user avatar
872 votes
24 answers
872k views

How do I read an embedded resource (text file) using StreamReader and return it as a string? My current script uses a Windows form and textbox that allows the user to find and replace text in a text ...
Me.Close's user avatar
  • 8,771
1 vote
2 answers
161 views

I’m working with iText 9.3.0 for .NET and need to fill a PDF form field (PdfTextFormField) with Arabic text and then flatten it so the text becomes permanent. However, when I set Arabic text directly, ...
Shahzaib Khan's user avatar
1080 votes
23 answers
1.0m views

I want to add a comma in the thousands place for a number. Would String.Format() be the correct path to take? What format would I use?
Seibar's user avatar
  • 70.6k
1 vote
0 answers
84 views

I want to use the PowerShell 7 cmdlet Get-ClusterResource in C# under Windows 11, like this: using System.Collections.ObjectModel; using System.Management.Automation; namespace PSHosting; class ...
Andreas's user avatar
  • 91
1 vote
2 answers
96 views

I have a class library project (C#) that contains a custom build logic in the custom .target file. To properly consume this class library, it is mandatory for a consuming project to include not only ...
Serg's user avatar
  • 4,831
0 votes
1 answer
142 views

I have an Aspire project that runs RabbitMQ, MongoDB, and PostgreSQL in Docker containers. My AppHost project defines them like this: var rabbitMQ = builder.AddRabbitMQ("rabbitmq") ....
Hidr4's user avatar
  • 23
1 vote
1 answer
94 views

I’m using Task.WhenAll with LINQ to run multiple async operations. However, when an exception is thrown inside one of the tasks, the stack trace seems incomplete compared to when I await each task ...
Ahmed Ben Khelifa's user avatar
696 votes
41 answers
1.5m views

I have a windows forms app with a textbox control that I want to only accept integer values. In the past I've done this kind of validation by overloading the KeyPress event and just removing ...
Mykroft's user avatar
  • 13.5k
0 votes
0 answers
44 views

I am trying to populate my fast report with dummy data using .NET code DataTable dt = new DataTable(); dt.Columns.Add("name", typeof(string)); dt.Columns.Add("days", typeof(string))...
Proba EPUS's user avatar
1 vote
0 answers
70 views

I am trying to integrate some server side pages in a Blazor Web App using Webassembly. I have a few pages in the client project, but I want some pages to run on the server. As such, I have added a ...
MaltDew's user avatar
  • 147
1178 votes
11 answers
496k views

What is the difference between a DateTime and a DateTimeOffset and when should one be used? Currently, we have a standard way of dealing with .NET DateTimes in a TimeZone-aware way: Whenever we ...
David Reis's user avatar
  • 13.8k
-3 votes
3 answers
180 views

Consider this unit test of an API client with an async function Index. Index should throw an exception when an http error occurs and thats what I want to test. public async Task TestServiceError() { ...
Serve Laurijssen's user avatar
1 vote
2 answers
119 views

I want to create a repository base class, every service should inherit from this BaseService. This is my code: public class BaseService<TEntity, TAddDto, TUpdateDto, TEntityDto> : IBaseService&...
ross's user avatar
  • 23
3 votes
1 answer
161 views

I have implemented INetworkListManagerEvents interface to get network connectivity state changes as a C# class. In my project, the INetworkListManagerEvents is code generated via CsWin32 source ...
Guezt's user avatar
  • 157
0 votes
0 answers
61 views

I am using the C# Windows.Devices.Bluetooth APIs to communicate with a device via BLE. The BluetoothLEDevice class does not expose connect or disconnect methods but at least the connect can be forced ...
Nirke's user avatar
  • 11
4 votes
2 answers
157 views

I have an old WinForms application with a normal TreeView, where I need to show customized tooltips for individual nodes. I am using a ToolTip component (OwnerDraw=true and IsBalloon=false), and I ...
Boise's user avatar
  • 379
0 votes
0 answers
78 views

I am attempting to setup a project with Aspire and DAPR. I want to register a sidecar in my API and Frontend application that will use pubsub. The pubsub should come from a DAPR yaml component file. I ...
Seany84's user avatar
  • 5,596
1 vote
2 answers
104 views

There are 2 ways I am aware of to get Activity Id inside my ASP.NET request: var id1 = System.Diagnostics.Activity.Current?.Id; var id2 = _httpContextAccessor.HttpContext?.Features.Get<...
Nika Tark's user avatar
5 votes
1 answer
100 views

The logging library .dlls, like Serilog.dll or Nlog.dll are not digitally signed by any code signing certificate from CA. I have been trying to find an info if in a case of commercial application, ...
Kon's user avatar
  • 53
0 votes
1 answer
145 views

I’m running a .NET project from the Cursor AI Agent terminal. The build finishes (I see the final summary line), but the Agent’s terminal keeps “running” forever (spinner never stops). I have to press ...
user2877989's user avatar

1
3 4
5
6 7
6816