Multiple Selection in WPF with MVVM architect
hello everyone, good morning, good afternoon, good evening.
I am implementing a ListView in WPF like this. Can you tell me the best way to implement Multiple Selection? I am using the MVVM architect for my application....
overriding methods
I have multiple questions:
1) What is the benefit of declaring a base method as
virtual
before overriding it in an inheriting class? This is my understanding: it allows calling the override despite casting to the base class. Is this correct?
2) What is the difference between overriding a method, and hiding a method? As in, what does the new
keyword do exactly?...How can I get format warning on the console?
I'm developing a .NET C# application for Linux and I was wondering if there's some way to get the warning I get on vscode like
Remove unused parameter 'Sender'IDE0060
or Name can be simplified IDE0002
on the console? I tried with dotnet format
and dotnet format analyzers
but those didn't printed any of those warning and they didn't fix them either.✅ EF Core Junction Tables with seperate columns
In EF Core:
I have entity X which has a list of Item Y
(This will let EF Core make a junction table to represent the many to many relationship)
Now as per my requirements I needed to add a Price to that junction table. So that the price only exists when and if there is a link between X and Y....
Asp.net (.net461, global.asax)
Hi - hopefully easy question but i have a legacy project im taking over. If i set output folder to bin, i can debug no worries. if i use bin/debug and bin/release, then bin/ stays empty (obv the bin/debug still gets created) but when i debug, i get dll cant be found. I thought ive always kept bin clean and use bin/debug before but now im not sure
✅ override and virtual
The book I'm reading about C# and the internet say that "you can't override a method of the base class without the virtual keyword" but I don't write virtual keyword and yet I can..
So I'm a bit confused.....
Asp.net Core bin vs bin/debug
Hi - hopefully easy question but i have a legacy project im taking over. If i set output folder to bin, i can debug no worries. if i use bin/debug and bin/release, then bin/ stays empty (obv the bin/debug still gets created) but when i debug, i get dll cant be found. I thought ive always kept bin clean and use bin/debug before but now im not sure
What are the actual downsides of using Aspire in prod, being aware it isn't supposed to be?
The company I'm working at has a product that is starting to grow and the project manager suggested making a small demo with Aspire to check out the benefits for us.
We finished up a demo (more like a lite version of the product, with very toned down features) and he asked me what the issues would be if we were to just use Aspire to orchestrate everything rather than deploying to something like kubernetes since everything was working well. I couldn't really answer that question since everything Aspire related is pretty new to me as well
So the main question is as stated in title, what are the downsides of doing it?...
API call hangs on mobile (.NET MAUI)
I have a .NET MAUI application that when deployed on my mobile device takes forever the actually make the API request. I have to restart the app multiple times before the request will actually go through. The API server receives the client connection but no data is ever sent. I have all the correct permissions for the mobile app. Is this a common issue with MAUI or is there an issue with the way I handle my HTTP requests?
Hello guys totally new to coding need some help
I'm 17 and just starting to learn coding with c#, if you could go back in time to my age would you recommend
1. Using YouTube and tutorials to learn
2. Focusing on going in blind with just the basics
3. Reading books and code to try and understand ...
Asynchronous batch processing (queue) in C#
Hey guys, I have some batches to process and to do so I have to send each of my batches to external APi to process. I have no experience with async programming so I simplified it a bit by using Parallel.Foreach that create thread/task for each API calling and waiting for response. The reason I dont want to call API synchronously Is that processing of one batch can take a one sec or 30min (max). With the Parallel.Foreach solution it looks it works fine but form what I read on internet it's not a good approach so I want to implement kind of async queue that will take a few items from my collection of batches starts processing and after some of them is finished replace it with another etc. I tried to came up with something using ChatGPT but it only process specified number of batches (3 in my case) and than it does nothing but even if the code is short there are lot's of new concepts for me so I have no idea how to fixed this. ```public async Task ProcessBatchQueueAsync(IEnumerable<int> batchIds)
{
var semaphore = new SemaphoreSlim(3);
var tasks = new List<Task>();
...
Signalr
Hi!
For work I have to connect the middleware with the backend in a fast way so I ended up deciding to use signalr.
I have a serverless signalr instance running in azure and an azure function for the bindings
I am start with a small poc to fully understand how it's working...
Application Insights Auto Instrumentation
banging my head against the wall on this one, anyone had the same issue i'm having with auto instrumenting an asp.net core web api running on azure app service linux container? It's not attaching and i'm losing it. It worked before but now it doesn't
.net 8...
Using stackalloc span in if statement
Hi I’m trying to use a span allocated on the stack of the function but it fails unless I reference the stack outside of an if statement. An example of this compiler error can be seen at https://sharplab.io/#v2:D4AQTAjAsAUCAMACEEB0BJA8gblrEAzMmIgMKIDesiNyRIALIgLIAUAlJdbTwEoCmAQwAmmAHYAbAJ4BlAA6CxAHgDGAC0EAnAHyJhAS00z+CzYIAuAe02kNmgM6IAvIgDa3Hp8QAFC2tQAIob8KlaasiZaFta2WgA0Hl60vub+AIIS5kGaIWERptE2dok8ALq4MEmIAiLi0vKKqna6CqnOiABEqN0dFVUltABm1kLqiKy8igDm/Ij2/FMAtvxi5oj6Yoit/vIS+uasKf5HxgVh7OwDNFSVVbQ1opKyCsrqWror5uHt267zS59yldPPpBuMAISsT7hVAAGRWUzaThcEEQADI0YhoVJXPBSs4XAByAD0hIuwJ4NzuSWx7WxqAAKpp9IsAKJiYSsAxGSJmMKxBzsPrUxAAXwptAlNBQAE4oasYQzLDIvhsphwhcDxbcaNrRUA=
Is this at all possible to achieve?...
code explaination
hi im new and i would really like someone more advanced to explain what this code does and also answer up my following up questions, thanks :D
.Net Aspire
wanted to know if my client is Unreal engine and i want to link it to my .net Aspire project with microservicees just want to know which ip should i give my unreal project to be able to talk to my backend i just want to use 1 ip or hostname.
i'm guessing we don't connect to the apphost or do we or do i need to create a api to give to unreal like i know how to create deploy aspire but no tutorial showing a nother client connect to aspire....
Trying to log information about event being used
Hello, i am a beginner in C# and i just want to know, how can i log info about an event in-game (CS2)? I have tried to use this https://docs.cssharp.dev/api/CounterStrikeSharp.API.Core.EventPlayerJump.html but when i copy and paste in into my code it doesnt work. I did a basic w3schools exercise on C# and some calculation tasks, so i really dont know much more about anything else in C# :D
i have 44 errors that I don't know how to fix
I seriously don't know what I'm doing wrong my program only has 106 lines
migrate to .NET 9
Do we have a guidelines or steps to migrate a solution to .NET 9 from older versions example .NET 8?