Reputation: 105
So I basically taught myself how to program (I didn't say I was any good), and I'm curious of what the names are for codes, it's hard for me to explain.
Console.WriteLine( "eg." );
^ and ^
I was wondering what they were called? Is it something like method and function? O.o
Upvotes: 1
Views: 79
Reputation: 161831
Console
is short for System.Console
. It's a class named Console
in the System
namespace.WriteLine
is a method within the Console
class.I would strongly suggest you start with some beginner's material. If you don't know what these things are called, you're going to find it impossible to learn anymore. All tutorial material will assume that you've at least heard of a class.
Upvotes: 2
Reputation: 15419
The left hand side of the code you listed before the period is the class. In this case the class is Console.
The right hand side of the period is a method. In this case, WriteLine().
This is an example of a static method call, because you did not instantiate an object of type Console, but rather just called a static method from that class.
Upvotes: 3