C# Flashcards
REFERENCE types in C#
automatically support being set null
VALUE types do
NOT automatically support being set to null and require an actual value, they are stored in the STACK
The QUEUE is a
FIRST IN, FIRST OUT collection of elements
The STACK utilizes a
LAST IN, FIRST OUT procedure
To declare a variable,
you do not need a value
To initialize a variable,
you DO need to assign it a value
PARAMETERS
are optional list of keywords that give certain qualities to a method or member
The IF statements
do not need an else statement
switch statements increase
and are more optimized for a larger number of conditions
Unary
Binary, and Ternary
=
is not a relational operator!
For loops have 5 parts.
(for keyword, initializer, conditional, increment, body)
CCR =
Clear, Concise, Readable
An Inline If statement is also called a:
Ternary Operator
What are the correct types of Arrays in C#?
Single-Dimensional Arrays, Multidimensional Arrays, Jagged Arrays
What are the 3 Required parts of a Class?
Class Keyword, Name, Scope
Why would you use an abstract class?
To create a partial class that serves as a template for its derived classes
Which of the following describes Abstract Classes?
It is an example of dynamic polymorphism
What is dynamic polymorphism:
Objects of a derived class may be treated as objects of a base class
Which of the following describes Polymorphism
One thing having many forms
When would you want to use the abstract keyword in an abstract class?
When you want the abstract class to define the method or accessor and give the derived class the ability to override the implementation
When would you want to use the virtual keyword in an abstract class?
When you want the derived class to define the method or accessor
Classes can implement
multiple interfaces
You must use an interface if you want to simulate
inheritance for structs
What are the 3 types of errors?
Compile Time, Runtime, and Logical
What are the 3 parts to a variable?
datatype, name, value
C# is strongly-typed /statically typed
strongly-typed(Once an object has a type, that type will NEVER change) & statically typed(Every object MUST have a type before the program will compile)
What does LINQ stand for?
Language Integrated Query
Select the two types of syntax used in LINQ
Query Syntax, & Method Syntax