yourFriend
*"Converting possible null value to non nullable type"* warning in `Console.ReadLine()`
Ok so, I was doing null check
string.IsNullOrWhiteSpace()
before returning string to my Main method that's why I was not able to generate Null Reference Exception. whether I declare string s
or string? s
8 replies
I need a help I had 10 years experience in C# and .Net , Entity Framework, WPF
https://github.com/milanm/DotNet-Developer-Roadmap
Might be helpful
38 replies
Code Forces Problem Way Too Long Words
Also break the problem into separate methods like for
1. Parsing int where (1 <= int <= 100)
2. Parsing string validating they are not null or empty or whitespace and length <= 100.
3. Solving problem (here abbreviating words whose length >10)
4 replies
In String constructor `String(Char*)`, `Char*` is character pointer or character array pointer?
Ok, so
Char*
in String(Char*)
is pointer of first element of character array. If I understand right.
Hence, both way declaring and initializing pointer works
Thanks, the link was very helpful 🙂18 replies
QuickSort implementation gets me an out-of-range error
Everything is alright at least for me. The problem was in
MakePivot()
method. I think it was mixing values with there index.
I completely rewrote the method MakePivot()
. Here's the whole program for reference: https://paste.mod.gg/ppikrzcciypc/0
Followed the algorithm mentioned in wikipedia: https://en.wikipedia.org/wiki/Quicksort
This image sums the whole algorithm: https://en.wikipedia.org/wiki/File:Quicksort-diagram.svg35 replies
QuickSort implementation gets me an out-of-range error
https://youtu.be/y-GNaO6OhdM?si=w5dHQkexUnS2HoUV
I agree that debugging in VS Code is little weird. This is what I do.
Making video on how to debug in VS Code took me more time than actually debugging the code.
35 replies
Book question. Explain this solution of Subset Sum problem.
I ended up using the third approach mentioned here: https://www.geeksforgeeks.org/subset-sum-problem-dp-25/
YouTube videos which I found helpful:
1. https://youtu.be/s6FhG--P7z0?si=HEvbMCp16XorcidT
2. https://youtu.be/34l1kTIQCIA?si=B8WddoCJSf5KBVu1
2 replies
C# learning
1. Depends on what you already know and what you want to learn or have to learn because of job requirements :when:
I'll prefer to do projects based on the course I just completed then move somewhere in this map: https://github.com/milanm/DotNet-Developer-Roadmap
16 replies
How to install dotnet runtime and sdks on debian virtual machine?
Thanks
I end up manually downloading it from https://dotnet.microsoft.com/en-us/download/dotnet/8.0
I works as intended but I am not able to set it as system wide environment variable.
I tried adding its path to
/etc/environment
like this
DOTNET_ROOT="/home/user/directory_where_i_have_downloaded_dotnet_runtime"
But it still shows dotnet: command not found
if I type dotnet in any directory other than the one where it is present.9 replies