Let's continue our Quick Start into C Sharp by talking about functions and classes. While variables store information, functions take action, they do something often based on some information provided to them. When you create a function just like a variable, you give it a name. I like to use upper camel casing, sometimes called pascal casing when naming functions, where you capitalize the first letter of the first word in addition to each subsequent word. This helps me distinguish between functions from variables, where I use lower camel casing. In addition to the function name, you also specify any arguments that you want to pass into the function. You can think of arguments as information that you want to give to the function for the function to perform its task. Arguments are specified between two parentheses after the function name. If you have a left paren and right paren with nothing between them, you are saying that there are no arguments. But if there are arguments, you would specify them between the parens and define them much like you define variables using a type and variable name. In fact, when you define arguments, you actually are defining local variables that exist within the function. Those variables are set based on the values passed into the function when you call the function. More on that later. In addition to arguments, before the function name, you also specify a return type. That is, you specify the type of data the function returns back to whoever is calling it. This type can be an int, Bool, String, or any of the same data types of variables. If the data type is set to void as shown here, that means the function does not return any information. You can also optionally set the access modifier or the function to things such as public or private, depending on how widely you want the function to be accessible. If the function is set to private, it will only be accessible within the class. That is, it can only be called within the class. If it's set to public, then you can call it from outside the class. As I said before, functions do things. You could think of a function as a name section of code that performs a specific task. You can specify what the function does between two curly braces that precedes the function declaration. You can see here I defined a public function named AddTwo that accepts two integer arguments, x and y, and returns an integer. Within the body of the function, I created a new local variable of type integer named z and set it to the sum of x plus y, which are also two local variables of type integer that were set up as arguments. The code then returns the resulting integer value back to whoever called the function. You call the function by name and provide the necessary data to the function to do its job. A call to this function might look like this. Here, I created an integer variable called playerHealth and set it equal to the result of the AddTwo function. Or I pass in the integer number 5 and 6. If this code run, the next line would output the contents of playerHealth to the console, which would be 11. Obviously, this is just a toy example, but it demonstrates several important programming concepts related to functions. Why do we create functions? Well, functions give you a mechanism to break a problem down into smaller parts. Each part of the problem is solved in a different function. Given that our code is compartmentalized into a function, it is easier to find problems and debug our code. Once a function has been created, tested, and we know it works, then we could reuse the function over and over. We don't have to duplicate code, this makes code more modular. Further, once we know a function works, we don't have to be as concerned with the details of the function. We call this concept abstraction in programming. We can treat the function as a black box that solves a problem. Classes have similar benefits of functions. One way to think of a class is as a container for a related group of variables or properties and functions or methods. Some of these properties and methods are public represented in green, which means that they can be interfaced from outside the class. Others are private, represented in red, which means they are only accessible from within the class. That is, only code within the class can use them. We define a class by using the class keyword. Then following that, the class name. I like to use upper camel casing on my class name just like function names. You can optionally include a base class that the class inherits from. In Unity, any class that we are attaching to a GameObject will inherit from the monoBehavior base class. If you're making classes in general in C Sharp, you may or may not inherit from other classes. Finally, just like variables and functions, we can define the access level of the class. If it's set to public, any other code can create instances of the class. For most of the scripts we write, we'll create public classes. Here is an example Player class script complete with class variables defined, which are also known as class properties and class functions defined, which are also known as class methods. As you program in C Sharp, you'll start to break down your game systems into classes, and within the classes, properties and methods. Before you know it, you'll be thinking in object-oriented methodology and dreaming in C-Sharp code.