|
What's everyone's opinion on the var keyword? I'm in the middle of a religious discussion on code reviews. Team 1 has no hard and fast rules: use var where it makes sense, for super long nested generics, etc. Team 2 insists that it should only be used when the type is immediately discernible from the rhs.
|
# ¿ Jul 9, 2014 21:31 |
|
|
# ¿ May 8, 2024 15:09 |
|
No Safe Word posted:Use var like all the time basically. (Both teams are correct, and it should almost always be immediately discernible from the RHS or you should consider refactoring) code:
|
# ¿ Jul 9, 2014 21:47 |
|
omeg posted:Do they also want to return to Hungarian notation? I don't know.
|
# ¿ Jul 9, 2014 22:26 |
|
Dred_furst posted:One can hope for WPF, forget it for winforms. what's the point? Would people event want WPF skinned apps on Linux / OSX?
|
# ¿ Nov 13, 2014 01:48 |
|
I took a job that has me writing Java instead of C# for services. This thread is like the happy place I go to get away from the awfulness I really want to get a Surface Pro 3 for personal projects but I can't justify the price tag right now.
|
# ¿ Dec 10, 2014 01:19 |
|
epalm posted:How so? When I was looking at 2.2 for a prototype web service, found out very quickly that you can’t register two discrete versions of the same type and then conditionally resolve later. With AutoFac we accomplished this with named registration and then named parameter resolution for the consuming types. Luckily you can replace the DI container with another one, although they made it slightly more obtuse in 3.0 Per the original poster, we use the built-in DI for any runtime things required to configure Kestrel that are out of the box, but for anything we own, they go into the AutoFac container.
|
# ¿ Nov 9, 2019 21:40 |
|
EssOEss posted:What is all y'all's experience with nullable reference types? Any great success stories to tell? I tried them out and just found it to be a nice idea that in practice is just a nuisance that did not help me at all. Wondering if this is a common experience or if there is a scenario where they prove worth bothering about. At best/most I'll use code:
code:
|
# ¿ Jul 12, 2021 20:04 |
|
cruft posted:Is there a way to dump the number of active tasks? I'm late to this but there are some well-known .NET runtime performance counters for thread pool queue length and thread count which are emitted by default. https://learn.microsoft.com/en-us/dotnet/core/diagnostics/available-counters I'm newer to .NET Core and it does seem like there are fewer useful counters by default compared to FX, but this might get you started as well?
|
# ¿ Feb 6, 2023 22:36 |
|
raminasi posted:I was going to say, I remember getting a lot of mileage out of staring at a Datadog dashboard with exactly the requested metrics on it, but I was on my phone and it was a couple years ago so I didn't post. I waited until I was at a desktop before I responded or even looked for that link
|
# ¿ Feb 6, 2023 23:10 |
|
|
# ¿ May 8, 2024 15:09 |
|
Add an explicit dotnet restore step, and then your build steps can pass the —no-restore flag to skip that.
|
# ¿ Sep 1, 2023 18:45 |