daniel2
daniel2
CC#
Created by Jexs on 8/3/2024 in #help
Am I reading this right?
56 replies
CC#
Created by Jason_Bjorn on 6/27/2024 in #help
LINQ help
I suggest u use for loop reversely
26 replies
CC#
Created by Trif☼ on 5/13/2024 in #help
✅ System.IO.FileNotFoundException
What get passed to this function
36 replies
CC#
Created by Trif☼ on 5/13/2024 in #help
✅ System.IO.FileNotFoundException
Show your code
36 replies
CC#
Created by Trif☼ on 5/13/2024 in #help
✅ System.IO.FileNotFoundException
Your code? Your file path?
36 replies
CC#
Created by js on 4/26/2024 in #help
✅ checking console input for certain letters
Therefore if you enter Y, not N is true
8 replies
CC#
Created by js on 4/26/2024 in #help
✅ checking console input for certain letters
Not Y OR not N
8 replies
CC#
Created by daniel2 on 4/24/2024 in #help
Graph structure problem, is my code correct?
The array stores all node in the graph
3 replies
CC#
Created by daniel2 on 4/24/2024 in #help
Graph structure problem, is my code correct?
Node[] nodes = new Node[10];
HashSet<Node> visited = new HashSet<Node>();
int count = 0;
for (int i = 0; i < nodes.Length; i++)
{
Node current = nodes[i];
if (visited.Contains(current)) continue;
while (current != null)
{
visited.Add(current);
current = current.Next;
if (visited.Contains(current) || current == null)
{
count++;
break;
}
}
}
Node[] nodes = new Node[10];
HashSet<Node> visited = new HashSet<Node>();
int count = 0;
for (int i = 0; i < nodes.Length; i++)
{
Node current = nodes[i];
if (visited.Contains(current)) continue;
while (current != null)
{
visited.Add(current);
current = current.Next;
if (visited.Contains(current) || current == null)
{
count++;
break;
}
}
}
3 replies
CC#
Created by js on 4/24/2024 in #help
how do i check if a string contains only words and space
19 replies
CC#
Created by Dread on 4/17/2024 in #help
Valid Inputs
for (int i = 0; i < 10; i++)
{

}
for (int i = 0; i < 10; i++)
{

}
73 replies
CC#
Created by Dread on 4/17/2024 in #help
Valid Inputs
yeahhhhh
73 replies
CC#
Created by Dread on 4/17/2024 in #help
Valid Inputs
instead of inputValues.Count think how many time you need to loop
73 replies
CC#
Created by Dread on 4/17/2024 in #help
Valid Inputs
so you need to change the condition of the for loop
73 replies
CC#
Created by Dread on 4/17/2024 in #help
Valid Inputs
so the for loop is not executing
73 replies
CC#
Created by Dread on 4/17/2024 in #help
Valid Inputs
because no element is inside the list
73 replies
CC#
Created by Dread on 4/17/2024 in #help
Valid Inputs
but currently inputValues.Count is 0
73 replies
CC#
Created by Dread on 4/17/2024 in #help
Valid Inputs
originally your code is:
List<int> inputValues = new List<int>();
for (int i = 0; i < inputValues.Count; i++)
{
// add user's input to list
}
List<int> inputValues = new List<int>();
for (int i = 0; i < inputValues.Count; i++)
{
// add user's input to list
}
73 replies
CC#
Created by Dread on 4/17/2024 in #help
Valid Inputs
Your original code is almost fine, with a slightly change to the for loop
73 replies