IsNotNull
IsNotNull
CC#
Created by JTN on 4/26/2024 in #help
✅ null thingy (SOLVED)
Its useful in larger projects, but I find it annoying sometimes when prototyping or for quick one-off projects.
21 replies
CC#
Created by JTN on 4/26/2024 in #help
✅ null thingy (SOLVED)
If you are learning and finding the null reference handling annoying or confusing... you can also disable it.
21 replies
CC#
Created by JTN on 4/26/2024 in #help
✅ null thingy (SOLVED)
In most systems, the code is made up primarily of classes and there are patterns to ensure private fields are initialized when the class is constructed. Its an easier way to deal with the null syntax.
21 replies
CC#
Created by JTN on 4/26/2024 in #help
✅ null thingy (SOLVED)
They probably are requiring static vars because they are easier to reason about when beginning, but it makes your code look unusual to experienced devs I think.
21 replies
CC#
Created by Sneaky Panda on 3/6/2024 in #help
Help with concurrency blocking issue
I wish I could get onto a project like that. I can't even get MS to review my job applications.
26 replies
CC#
Created by Sneaky Panda on 3/6/2024 in #help
Help with concurrency blocking issue
Luckily I'm primarily a web / business / app dev, and 'all cores and CPU bound' work is pretty rare.
26 replies
CC#
Created by Sneaky Panda on 3/6/2024 in #help
Help with concurrency blocking issue
@mtreit I agree, I just meant that the pauses increase in relative expense with the number of active threads you have. There is some threshold (in allocation rate and active threads) where it costs less to split the work across processes...and I bet its a lower threshold than we would want to know about; probably at a level that most of us would claim its a premature optimization or too annoying/complicated to support in a hand-waivey way.
26 replies
CC#
Created by Sneaky Panda on 3/6/2024 in #help
Help with concurrency blocking issue
The 'fundamentals' GC page mentions this offhand. I bet on CPU bound and allocation heavy code, that the threshold before its worth partitioning data to IPC to child processes to handle is probably a lot lower than most devs expect (assuming the inputs and outputs are reasonable to serialize).
26 replies
CC#
Created by Sneaky Panda on 3/6/2024 in #help
Help with concurrency blocking issue
The GC docs feel a bit inconsistent. They have contemporary verbiage indicating some features have replaced others and then out-of band warnings claiming some things don't apply if you are using NET FX. Its really hard to tell what applies in a bog standard .NET 5.0+ project by default
26 replies
CC#
Created by Sneaky Panda on 3/6/2024 in #help
Help with concurrency blocking issue
No description
26 replies
CC#
Created by Sneaky Panda on 3/6/2024 in #help
Help with concurrency blocking issue
I was trying to confirm that, but all I found so far was confirmation that it pauses all threads during a 'foreground' G0 or G1 collection (meaning a background G2 is already occuring)
26 replies
CC#
Created by Sneaky Panda on 3/6/2024 in #help
Help with concurrency blocking issue
Is that only true (on workstation GC) if a gen 2 collection is already occurring in the background?
26 replies
CC#
Created by Gipper on 12/24/2023 in #help
ASP.NET error when pulling data from Db???
The obj folder contains files visual studio is working with as it has the project open. It copies those to bin when it does a build or before debugging. If you are running your project from the bin folder (for exapmle, you ran 'dotnet run') when VS tries to do a build, it can get this error. This can also happen if the last run of your project didn't exit properly, if a virus software has the file locked, or any other reason that causes the file to be locked. If you have this error in VS, then whatever you think you are running when 'pulling data from the Db' is probably out of date with the code you are editing, as your build(s) are failing.
4 replies
CC#
Created by Noriega on 12/24/2023 in #help
Exception about disposing DbContext
Does 'Guild' have any EF relation properties? You are putting the 'Guild' entry into a memory cache that outlives the DbContext it came from. If you try to access a relation property, it will try to use the disposed context to query the related entity and then throw an error like this.
10 replies
CC#
Created by Kahrolsun Masonlar on 12/20/2023 in #help
✅ My bot isn't working
I emptied it because I took the size
Can you rephrase that? I understand the words, but don't see the relation between empying and taking the size
180 replies
CC#
Created by Kahrolsun Masonlar on 12/20/2023 in #help
✅ My bot isn't working
Finding an auth token requires understanding discords auth flow
180 replies
CC#
Created by Kahrolsun Masonlar on 12/20/2023 in #help
✅ My bot isn't working
You are missing code that configures or finds an auth token
180 replies
CC#
Created by Kahrolsun Masonlar on 12/20/2023 in #help
✅ My bot isn't working
You can't pass an empty auth token
180 replies
CC#
Created by Kahrolsun Masonlar on 12/20/2023 in #help
✅ My bot isn't working
Be realistic, there are errors in the code
180 replies
CC#
Created by Kahrolsun Masonlar on 12/20/2023 in #help
✅ My bot isn't working
I understand
180 replies