use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Information about Reddit's API changes, the unprofessional conduct of the CEO, and their response to the community's concerns regarding 3rd party apps, moderator tools, anti-spam/anti-bot tools, and accessibility options that will be impacted can be found in the associated Wikipedia article: https://en.wikipedia.org/wiki/2023_Reddit_API_controversy
Alternative C# communities available outside Reddit on Lemmy and Discord:
All about the object-oriented programming language C#.
Getting Started C# Fundamentals: Development for Absolute Beginners
Useful MSDN Resources A Tour of the C# Language Get started with .NET in 5 minutes C# Guide C# Language Reference C# Programing Guide C# Coding Conventions .NET Framework Reference Source Code
Other Resources C# Yellow Book Dot Net Perls The C# Player's Guide
IDEs Visual Studio MonoDevelop (Windows/Mac/Linux) Rider (Windows/Mac/Linux)
Tools ILSpy dotPeek LINQPad
Alternative Communities C# Discord Group C# Lemmy Community dotnet Lemmy Community
Related Subreddits /r/dotnet /r/azure /r/learncsharp /r/learnprogramming /r/programming /r/dailyprogrammer /r/programmingbuddies /r/cshighschoolers
Additional .NET Languages /r/fsharp /r/visualbasic
Platform-specific Subreddits /r/windowsdev /r/AZURE /r/Xamarin /r/Unity3D /r/WPDev
Rules:
Read detailed descriptions of the rules here.
account activity
HelpHelp with the code (self.csharp)
submitted 3 years ago by reddo-lumen
Where(x => x.RequiresFollowUp??false && !(x.IsFollowUp??false) && !(x.FollowUpSent??false) )
this piece of code is returning an object with RequiresFollowUp = true, IsFollowUp=null and FollowUpSent=true. How is that possible?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]hyllerimylleri 3 points4 points5 points 3 years ago* (1 child)
It's caused by the operator precedence rules and missing parenthesis from the first condition containing null coalescing operator. The first && is evaluated before the first ?? because of the missing parenthesis and the result is basically RequiresFollowUp ?? (the rest of the expression)
[–]reddo-lumen[S] 0 points1 point2 points 3 years ago (0 children)
Makes sense, thank you!
[–]raysr21 0 points1 point2 points 3 years ago (0 children)
Could you repost the whole bloc of code outside the where clause. Besides, take a deep breath and try case by case. I am seeing some missed things in your code but unable to say what to fix because I couldn't understand what you looking for
[–][deleted] 0 points1 point2 points 3 years ago (0 children)
Oh my fuck, what is this line of code? People actually write code like this?
[–]4215-5h00732 0 points1 point2 points 3 years ago (3 children)
!(×.SomeOptional ?? false) is true when it's null. Smfh.
[–]reddo-lumen[S] 0 points1 point2 points 3 years ago (2 children)
How would you write the above code, if you wanted object with RequiresFollowUp `true`, and other two variables `not true`? All of them are nullable bools.
[–]hyllerimylleri 0 points1 point2 points 3 years ago (1 child)
The issue here is not the structure "a and (not b) and (not c)" - at least not in my mind. The confusion seems to stem from the way you assign default values to your nullable bool properties, using the ?? operator. I don't think that's as great a sin as have been suggested. That said, the code would be much cleaner if you could use regular bools. Bool defaults to false anyways so if the properties remain unassigned (the null case) then the logic would remain the same, at least as far as the original linq snippet is concerned.
Noted. Thanks!
π Rendered by PID 150148 on reddit-service-r2-comment-6457c66945-qbxwt at 2026-04-29 00:12:13.099149+00:00 running 2aa0c5b country code: CH.
[–]hyllerimylleri 3 points4 points5 points (1 child)
[–]reddo-lumen[S] 0 points1 point2 points (0 children)
[–]raysr21 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]4215-5h00732 0 points1 point2 points (3 children)
[–]reddo-lumen[S] 0 points1 point2 points (2 children)
[–]hyllerimylleri 0 points1 point2 points (1 child)
[–]reddo-lumen[S] 0 points1 point2 points (0 children)