Hello guys, I have just came across the nameof() keyword so I read a bit about it. Can someone confirm whether the following statement is correct please (add up to it if need please). So, from what I've understood, nameof() is used to dynamically fetched the name of a variable without hardcoding it into a string? Like if we don't use nameof() and directly use the variable name, what happens is we don't fetch the variable name itself but the value it contains?
I noticed we also used in when throwing an exception, is there a reason for that? Or it's just to know which argument causes the error ?