TheUnquiet
TheUnquiet
CC#
Created by TheUnquiet on 10/21/2024 in #help
What type of 3 layered architecture should I use
No description
2 replies
CC#
Created by TheUnquiet on 5/28/2024 in #help
Name does not exist in the current context
I need to access the Text inside a textBox but its name does not exist. the code is found in the text files
336 replies
CC#
Created by TheUnquiet on 4/30/2024 in #help
Advice for 3 Layer Architecture,
i have a 3 layer Architecture project, I have to add Clients, Orders and Products should I make a OrdersManager, ProductManager and so on? Same question but with the repo that will write to the database should I have one for the entire project or one for each type? I'd really like some advice
2 replies
CC#
Created by TheUnquiet on 4/8/2024 in #help
The name 'InitializeComponent' does not exist in the current context
I was working with a WPF project and this error suddenly appeared. I can't run this project anymore I looked at namespaces everything matches.
4 replies
CC#
Created by TheUnquiet on 3/31/2024 in #help
Advice on making sure an object cannot be added to another list
I've got a program with boats, companies and fleets, if a ship is added to one fleet it cannot be added to another fleet, could someone give me some guideness as to how to achive this?
108 replies
CC#
Created by TheUnquiet on 3/19/2024 in #help
Update an enum in a child class
I have a class Gastanker that inherts from Olietanker, I need to update the Lading enum in Olietanker for Gastanker class, can someone help me with this?
42 replies
CC#
Created by TheUnquiet on 2/28/2024 in #help
Random Generator method
could someone help me with this method? if the list contains a number we should generate a new random number that is not in the list
c#
public int GeefUniekGetal(int maximum)
{
const int minimum = 1;
int result = 0;

if (getallen.Count != maximum)
{
if (!getallen.Contains(result))
{
result = new Random().Next(minimum, maximum);
getallen.Add(result);
} else
{
int newResult = new Random().Next(minimum, maximum);
getallen.Add(newResult);
}
} else
{
result = 0;
}
return result;
}
c#
public int GeefUniekGetal(int maximum)
{
const int minimum = 1;
int result = 0;

if (getallen.Count != maximum)
{
if (!getallen.Contains(result))
{
result = new Random().Next(minimum, maximum);
getallen.Add(result);
} else
{
int newResult = new Random().Next(minimum, maximum);
getallen.Add(newResult);
}
} else
{
result = 0;
}
return result;
}
58 replies