Seems like you’ve got a small typo here, you want to use getcomponent this way instead: var script = obj.GetComponent<MeshScript>();
Also remember, C# is case sensitive, which means when you declare a variable, you have to consider upper and lower case of every character on it, when using it.
Sure, you’re not supposed to use a reserved keyword as an identifier in C#.
How do you think the parser can differentiate what you mean?
Here is the list of all reserved keywords in C#, the bottom list are the contextual ones (such as value or yield), but if you can help it, avoid those as well.
If you really need to specify a name that is a reserved keyword, prepend @ sign to it, like so