- Home /
Question is off-topic
When to put syntax and convention for c sharp
When do you put commas, capitalize words, quotation. When I look at the Syntax and convention for c sharp. It didn't tell me when to add comma, capitalization and put the equal sign. When I do C sharp most of the time when I save and run a script I get complying error and it won't play. In some commands you capitalize the first letter and sometimes you don't. Sometimes you put like =("") sometimes you just type it out or =(). I want to know like the rule for it. For example you use quotation for this or you capitalize the first letter when this happen.
A general primer on C# syntax is beyond the scope for a UA answer. UA is designed to answer a single, specific technical question. Any beginning book and many web pages systematically cover C# syntax. But I did want to touch on capitalization since it is a frequent problem on this list and a source for some of the issues posted.
By convention variables start with lower case letters. Classes and functions start with upper case letters. Understanding this convention makes sample scripts in Unity much more readable. That is 'Rigidbody' is not the same as 'rigidbody'.
Follow this Question
Related Questions
Syntax Error with WebGL Game 1 Answer
Error building Player because scripts had compiler errors 0 Answers
I want to change the animation of an object when it hits any object in a layer 2 Answers
Why am I getting a cannot convert error? 1 Answer
I have an error placing my pickup script into game 0 Answers