blokyk
✅ Disable IDE0046 (use conditional return) when throw is involved
Hello, I was wondering if there is any way to disable "Use conditional return" when half of the expression is a throw expression? I'm not too well-versed when it comes to fine-grained
.editorconfig
stuff...
Example code:
5 replies
✅ Override (abstract) getter-only property with a setter
Hello! I was wondering if there is anyway to add a setter to an overridden getter-only property?
Currently, I've tried the following:
I'd prefer avoiding a constructor, since the rest of my hierarchy uses
required
properties, and Derived
is actually sub-classed elsewhere, so adding a constructor would make things a bit clunky...13 replies
❔ Using net7 documentation while targeting netstandard2.0
This might be a bit of a dumb question, but is there anyway to make omnisharp/roslyn's tooltips use the xml docs from a newer version of .NET (like .NET 7) while targeting
netstandard2.0
? What about nullability annotations (although I'm pretty sure that one is impossible without dangerously messing with ref assemblies) ?14 replies
Excluding record member from default equality comparison
When declaring a record, it seems that every instance field/property, no matter its accessibility, is included in the default equality implementation. Is there any way to exclude a specific member from it without having to manually write the implementation ?
Sharplab link : https://sharplab.io/#v2:D4AQDABCCMB0CSB5A3AWAFAgMwQE4FMBjAe1wBMIAlACgEsA7AFwloBoppIBnASggG8MEYRAAOuWgDcAho3wQAYrQA2+ePQBmxCBrToAvkA=
1 replies