Basics Flashcards
Define method.
A method performs an action in a series of statements.
Define statement block
a pair of braces containing zero or more statements.
What is an argument.
An argument is data passed to a method as a parameter.
C# recognizes a method called ______ as signaling the default entry point of execution.
Main
static int Main(string[] args) { . . . }
List the main types of functions supported by C#.
constructors, methods, operators, properties, events, indexers, and finalizers.
At the outermost level of a program, types are organized into _______.
namespaces
The using directive is used to make a namespace available to an application.
The C# compiler compiles source code, specifies as a set of files with the .cs extension, into an _______.
assembly.
An assembly is the unit of packing and deployment in .NET and can be either an application or a library.
What is the name of the C# compiler?
csc.exe
What is an Identifier?
Iderntifiers are names that programmers choose for their classes, methods, variables, and so on.
An identifier must be a whole word, made up of Unicode characters starting with a letter or underscore and are case-sensitive.
What is a keyword?
Keywords are names that mean something special to the compiler and are reserved, which means they can not be used as an identifier.
List all of the keywords
abstract as base bool break byte case catch char checked class const continue decimal default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long namespace new null object operator out override params private protected public readonly ref return sbyte sealed short sizeof stackalloc static string struct switch this throw true try typeof uint ulong unchecked unsafe ushort using virtual void volatile while
Is it possible to use a keyword as an identifier? If so, how?
It is possible to use a keyword as an identifier by qualifying it with the @ prefix.
Is @varName == varName?
The @ symbol doesn’t form part of the identifier itself so @varName is the same as varName.
What is a literal?
Literals are primitive pieces of data lexically embedded into the program and also known as fixed values.
It is essentially a language type with an associated value. int dayInMonth = 9;
What is a punctuator?
A punctuator help demarcate the structure of a program.Common punctuators include: { } [ ] ‘ “ ;