Gladiator
Gladiator
Explore posts from servers
CC#
Created by Gladiator on 1/22/2023 in #help
❔ Should dictionary values be value types (struct)
Product type, int available, int reserved. OK, appreciated
15 replies
CC#
Created by Gladiator on 1/22/2023 in #help
❔ Should dictionary values be value types (struct)
I exactly said what stock data contains
15 replies
CC#
Created by Gladiator on 1/22/2023 in #help
❔ Should dictionary values be value types (struct)
I agree it is better to define it as struct (immutable)
15 replies
CC#
Created by Gladiator on 1/22/2023 in #help
❔ Should dictionary values be value types (struct)
Stock data contains available count and reserved count.
15 replies
CC#
Created by Gladiator on 1/22/2023 in #help
❔ Should dictionary values be value types (struct)
Suppose dictionary values is about sotck Dictionary key is product type and value is stock data
15 replies
CC#
Created by Gladiator on 1/22/2023 in #help
❔ Should dictionary values be value types (struct)
My confusion is I should track it reflects or not. It is struct or class, then if it is class type, they create it and then pass to another class or not. Because it is not my code, I have to move to other classes back and forth to understand it
15 replies
CC#
Created by Gladiator on 1/22/2023 in #help
❔ Should dictionary values be value types (struct)
Changing data when it is reference type, reflects changes, is it OK generally?
15 replies
CC#
Created by Gladiator on 12/27/2022 in #help
❔ Consider struct or class types for small event args
Yes, my problem OnValueChanged<old,new> e.g.
12 replies
CC#
Created by Gladiator on 12/27/2022 in #help
❔ Consider struct or class types for small event args
Action<int,float,int> vs Action<CustomType>
12 replies
CC#
Created by Gladiator on 12/27/2022 in #help
❔ Consider struct or class types for small event args
nameless params
12 replies
CC#
Created by Gladiator on 12/27/2022 in #help
❔ Consider struct or class types for small event args
Clean code
12 replies
CC#
Created by Gladiator on 12/27/2022 in #help
❔ Nullable enums or None inside
Dictionary<TaskType,PriorityQueue<>>
11 replies
CC#
Created by Gladiator on 12/27/2022 in #help
❔ Nullable enums or None inside
If I include None inside, I have trouble, in many situations I should ignore None
11 replies
CC#
Created by Gladiator on 12/27/2022 in #help
❔ Nullable enums or None inside
yes
11 replies
CC#
Created by Gladiator on 12/27/2022 in #help
❔ Nullable enums or None inside
I have a list/priority queue for each task type
11 replies
CC#
Created by Gladiator on 12/27/2022 in #help
❔ Nullable enums or None inside
OK, yes
11 replies
CC#
Created by Gladiator on 12/27/2022 in #help
❔ Nullable enums or None inside
for example in dictionary
11 replies
CC#
Created by Gladiator on 12/27/2022 in #help
❔ Nullable enums or None inside
Because I can iterate over or store tasks using tasktype
11 replies
CC#
Created by Gladiator on 12/10/2022 in #help
❔ static fields for struct types
What about defensive copy for readonly structs?
7 replies
CC#
Created by Gladiator on 12/6/2022 in #help
❔ From which version, we can call non static methods in field declaration time?
public class AA {
public int a = GetAA();

public int GetAA() {
return a;
}
}
public class AA {
public int a = GetAA();

public int GetAA() {
return a;
}
}
15 replies