Keeping track of where this function was called from #191
valkyrienyanko
started this conversation in
General
Replies: 1 comment
-
Probably not too worth it. If we log it with a stack trace, it should be good enough. If we do it, I'd perfer:
If you really want to, the best idea I have is to create a Wrapper around the list with a name property. I wouldn't recommend it. private class NamedList<T> : List<T>
{
public string Name { get; set; } = "Hello!";
}
private void Tester()
{
NamedList<string> fruits = new()
{
Name = "Basket of Fruit"
};
CheckFruit(fruits);
}
private void CheckFruit(NamedList<string> fruits)
{
Console.WriteLine(fruits.Name);
fruits.ForEach(fruit => fruit += "!");
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've added this
string raycastGroup
to help with debugging and I'm thinking of using this convention in other functions but it's kind of tedious to setup. Is there a easier way of keeping track of something like this?I would have to add a string param here too if I wanted to do the same thing but again it's seems like there is a better way of doing this
Beta Was this translation helpful? Give feedback.
All reactions