Skip to main content
Filter by
Sorted by
Tagged with
Advice
3 votes
6 replies
35 views

Suppose there's an interface interface IAnimal { IFood GetPreferredFood(); } and a class class Cat<F>(F food) : IAnimal where F : IFood { private F _food = food; public F ...
Massimiliano Micol's user avatar
0 votes
1 answer
28 views

I am encountering a duplicate key value violates unique constraint error in my ASP.NET Core application, and while I understand why it happens, I am unsure about the best practice to handle it using ...
amg63's user avatar
  • 25
-4 votes
0 answers
33 views

everyone! The Problem: Some users are experiencing a crash loop during the application startup. The logs indicate a Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 10: 'disk I/O error'...
user userrevick's user avatar
0 votes
1 answer
69 views

I am getting what I believe is an infinite loop happening when I am trying to create view models from my model data, i.e. mapping them. The error I get is a 'stack overflow error'. I believe the ...
Nuvolari's user avatar
  • 1,183
1 vote
1 answer
84 views

I have the following class called MessageSaver in a dll called MessageSaver.dll. This dll can be used by a .NET app for saving messages to a text file. The .NET app could be a Winforms app or a WPF ...
Sunil's user avatar
  • 21.6k
1 vote
1 answer
47 views

I have a C# Controller method that happily receives small files but when I try to upload a large file from the browser client, the "files" parameter is null. I have searched the web and ...
McMurphy's user avatar
  • 1,493
-1 votes
0 answers
40 views

I tried to connect to my HMI by modbus TCP, but it threw a System.IO.IOException: 'Unable to read data from the transport connection' I previously connected to another HMI(BeiJer X2 base 7) using ...
user22402093's user avatar
1 vote
2 answers
52 views

I finally found out the basic mechanism that C# uses to implement an async/await construct (using continuations). However, this led me to question data integrity. Imagine the following: class ...
Simon Parker's user avatar
  • 1,906
Advice
0 votes
4 replies
48 views

I have never queried mongoDB before using C#, usually only things like SQL Server which seem more straight forward to me. I am also not an expert in C#, so please do not beat me up. Trying to learn. I ...
John Couch's user avatar
Best practices
0 votes
2 replies
87 views

I want to clean this extension method (I am sorry for what you about to see, I am pretty shamed about this code 😅) but I have no I idea how to do it, so I am asking your help if you have any ideas of ...
aymen's user avatar
  • 61
Best practices
0 votes
2 replies
48 views

I have two C++/WinRT classes that are projected to C# (NET 8.0): One implements an image decoding from a vendor's SDK in plan C++. Let's call it the producer, and the image data is presented in an ...
Guillermo's user avatar
0 votes
1 answer
36 views

I'm working on updating some older systems to slightly more modern code. I have a C# solution that was targeting .NET Framework 4.6.2, but is now on .NET Framework 4.8.1. The solution builds fine in ...
Paul Brindley's user avatar
-1 votes
0 answers
30 views

I have a .NET Framework 4.8 application that shows a 3D object. I would like to add a fixed Object that always stays in the top left corner, regardless of the move/rotate/zoom of the main model. Does ...
Matteo TeoMan Mangano's user avatar
0 votes
1 answer
72 views

My ASP.NET Core Web API endpoint is used to get the data from a SQL Server database. The controller calls the repository method, gets the instance of the domain class with the result from the database,...
pepr's user avatar
  • 21.1k
2 votes
2 answers
153 views

Imagine the following classes (much simplified version of the real use case): public class Driver { public Int32 Id { get; set; } public String Name { get; set; } public String Country { ...
MythJuha's user avatar

15 30 50 per page
1
2 3 4 5
108260