0_00
0_00
CC#
Created by 0_00 on 5/6/2023 in #help
How to check if two values are in the same child of a class?
The user inputs their username and then their password. I want to check to see if both inputs are in the same child of the class.
26 replies
CC#
Created by 0_00 on 3/24/2023 in #help
What does this error code mean
'Supervisor' does not contain a definition for 'getlastName' and no accessible extension method 'getlastName' accepting a first argument of type 'Supervisor' could be found (are you missing a using directive or an assembly reference?) [assignmentrandom1]
'Supervisor' does not contain a definition for 'getlastName' and no accessible extension method 'getlastName' accepting a first argument of type 'Supervisor' could be found (are you missing a using directive or an assembly reference?) [assignmentrandom1]
To clarify, I made two children class that both call 'getlastName', however only one class gives this error while the other class works fine when called.
3 replies
CC#
Created by 0_00 on 3/24/2023 in #help
how to set enum type based on what child class is used
I have the public enum
public enum WorkerType{
Worker,
Associate,
Supervisor
}
public enum WorkerType{
Worker,
Associate,
Supervisor
}
and I'm making a method to set the enum based on which child class is called. So if class1 is called it will set the enum to worker, if class2 (child of class 1 with inherited variables) it sets to associate etc. I want to set my method up like
public void setWorkerType(){
if (class = class1){
this.WorkerType = WorkerType.Worker
}
public void setWorkerType(){
if (class = class1){
this.WorkerType = WorkerType.Worker
}
but my issue is that im not sure how to set up my if statement so that the class is checked is class1 or not.
27 replies
CC#
Created by 0_00 on 3/13/2023 in #help
❔ working with classes and they arent working
12 replies
CC#
Created by 0_00 on 3/13/2023 in #help
Classes question in c#
4 replies
CC#
Created by 0_00 on 2/4/2023 in #help
build errors in my function
68 replies