yourFriend
yourFriend
CC#
Created by yourFriend on 4/1/2025 in #help
*"Converting possible null value to non nullable type"* warning in `Console.ReadLine()`
Thank you both for info
8 replies
CC#
Created by yourFriend on 4/1/2025 in #help
*"Converting possible null value to non nullable type"* warning in `Console.ReadLine()`
Yes
8 replies
CC#
Created by yourFriend on 4/1/2025 in #help
*"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
CC#
Created by Dragonboa on 3/31/2025 in #help
I need a help I had 10 years experience in C# and .Net , Entity Framework, WPF
38 replies
CC#
Created by yourFriend on 3/30/2025 in #help
Error acquiring .NET when offline but works when online in VS Code
Now I have no idea how to reproduce it.
5 replies
CC#
Created by yourFriend on 3/30/2025 in #help
Error acquiring .NET when offline but works when online in VS Code
My problem resolved again. All I did was uninstall then install .net sdk again. 😂
5 replies
CC#
Created by Technical Developer on 3/28/2025 in #help
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
CC#
Created by Lukas on 3/29/2025 in #help
I have a huge exam next week
It's just fear. 1. Chill out 2. You'll definitely gonna repeat. That will give you more experience. But do try your best to clear. 3. First prepare what you've already touched. 4. And just take your best shot.
24 replies
CC#
Created by yourFriend on 3/28/2025 in #help
In String constructor `String(Char*)`, `Char*` is character pointer or character array pointer?
👍
18 replies
CC#
Created by yourFriend on 3/28/2025 in #help
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
unsafe
{
char[] cArray = {'a','r','r','a','y'};

fixed(char* ptr = cArray)
{
string s = new string(ptr);
// Do stuff with string s
}

fixed(char* ptr = &cArray[0])
{
string s = new string(ptr);
// Do stuff with string s
}
}
unsafe
{
char[] cArray = {'a','r','r','a','y'};

fixed(char* ptr = cArray)
{
string s = new string(ptr);
// Do stuff with string s
}

fixed(char* ptr = &cArray[0])
{
string s = new string(ptr);
// Do stuff with string s
}
}
Thanks, the link was very helpful 🙂
18 replies
CC#
Created by springblitz on 3/24/2025 in #help
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.svg
35 replies
CC#
Created by springblitz on 3/24/2025 in #help
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
CC#
Created by yourFriend on 3/17/2025 in #help
Book question. Explain this solution of Subset Sum problem.
2 replies
CC#
Created by Aikonekkk on 3/15/2025 in #help
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
CC#
Created by yourFriend on 3/14/2025 in #help
How to install dotnet runtime and sdks on debian virtual machine?
Thanks it worked out I had to add path in /etc/profile
9 replies
CC#
Created by yourFriend on 3/14/2025 in #help
How to install dotnet runtime and sdks on debian virtual machine?
PATH="/home/user/directory_where_i_have_downloaded_dotnet_runtime" Like this?
9 replies
CC#
Created by yourFriend on 3/14/2025 in #help
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
CC#
Created by yourFriend on 3/1/2025 in #help
Is Merge Sort implementation wrong in Wikipedia?
I was thinking of copying array B to A after sorting to then use the new partly sorted array A in further steps of recursion instead of using completely unsorted A each time.
void TopDownMerge(B[], iBegin, iMiddle, iEnd, A[])
{
// Sort B

// Then copy B to A
}
void TopDownMerge(B[], iBegin, iMiddle, iEnd, A[])
{
// Sort B

// Then copy B to A
}
10 replies
CC#
Created by yourFriend on 3/1/2025 in #help
Is Merge Sort implementation wrong in Wikipedia?
I am so blind. Thank you.
10 replies
CC#
Created by M. Hammad on 2/22/2025 in #help
pLEASE recommend me a C# backend or software engineer roadmap
I'm just a noob, so can't comment on its credibility
21 replies