Because the wiki is wrong, actually. GetClassName returns a name, not a string, and names are ints generated from a string with a hashing algorithm (so that different strings get different numbers).
That said, using String.Format like that is janky IMO. It's abusing the fact that the compiler will implicitly cast names to strings. Which is fine, since apparently there's no explicit casting, but there's a much simpler, better and less performance-wasting way to do it:
- Code: Select all • Expand view
string className = GetClassName ();
if (className.IndexOf ("Vile"))