Skip to main content
Filter by
Sorted by
Tagged with
-3 votes
1 answer
80 views

I have the following 2 classes. MyClass composes MyOtherClasses. Each of them requires different ILogger<foo>: public class MyClass { private readonly ILogger<MyClass> _logger; ...
khteh's user avatar
  • 4,280
1 vote
2 answers
137 views

I want to add a Option<bool> to the root command but still show the default output when the option is not provided. RootCommand rootCommand = new RootCommand("My root command"); ...
khteh's user avatar
  • 4,280
-1 votes
1 answer
45 views

I have table A with millions of rows, and there's a one to many relationship to table B, where each entry for the item in A will only have 1-4 values. When I query, as part of my returned data, I need ...
Gargoyle's user avatar
  • 10.5k
4 votes
1 answer
126 views

I am working on a method to convert a numeric value of type TSource to another numeric type TDestination in a safe and optimized way. I am using .NET 9 and the generic INumber and IMinMaxValue ...
Islam Elnaggar's user avatar
1 vote
1 answer
69 views

I have a class library representing my EF Core 9 database. That library includes a NuGet package of attributes that are set on the model. It's used to configure the generation of PUML files at ...
Gargoyle's user avatar
  • 10.5k
4 votes
1 answer
970 views

I'm trying to wrap my head around the new System.Threading.Lock object in c#9. In the old days I used to use good old lock(object) to prevent multiple threads accessing the same part of code like so: ...
Louis Somers's user avatar
  • 3,040