• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/56

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

56 Cards in this Set

  • Front
  • Back
In C#, almost everything ...
... can be treated as an object in this programming language.
What are the differences between functions and variables in C# and those in JavaScript.
In C# there are no global functions or global variables. Everything is in classes. JavaScript, however, does have global variables.
A gaming system for which C# can do programming is
The Xbox.
A Namespace is?
Just a collection of related classes.
The general format for namespaces and classes is?
Namespace.Class (e.g., System.Math).
"Using" statements at the top of a program do what?
Tell which pieces of the .NET framework library the project will be using.
These "using" statements at the top of the .cs code are like what in JavaScript and C++?
Like the import statements in javascript and C++.
C# uses namespaces to do what?
Organize code into related groups.
Namespaces are an organizational tool that does what?
Keep related code together.
A NAMESPACE prevents certain problems. For example ...
If your program defines a class with the same name as a class in some other .NET library (from MSFT or a third party), then THIS keeps keeps the two classes from interfering with one another.
A C# program contains at least one what?

By default, IT is located where?

What does it consist of?
A C# program contains at least one CLASS DEFINITION. By default, the class definition is immediately two lines down from the start of the namespace. It consists of the word "class" followed by another word. For example: "class Program" or "class XXX".
The class keyword does what?
The class keyword is used to define and create objects.
Within your C# program, Visual Studio expects to find what in order to run at all?
Within your C# program, Visual Studio expects to find a function named "Main". Main(){} is necessary for program to run. "Main" effectively starts your program.
What is Console?
"Console" is a built-in object in C#. You can use methods such as ".WriteLine" on it.
How do built-in objects such as Console appear in the Visual Developer development window?
Their letters appear blue-green. This is true of complex objects created by the programmer, as well.
Under "Project" is an option to change ..
... an option to change the major properties (essentially the settings) of your project.
In properties, you can change ...
... you can change the "Target Framework" (version of .NET) and the type of application (e.g., console).
In project properties, you have options for changing ...
... have options for changing "Application," "Build", "Debug" and others.
Prefix increments and postfix increments matter when you are using ...
... when you are using placeholder expressions. If you have a placeholder {0}, ++a will insert an incremented a into the placeholder. a++ will insert an UNincremented a into the placeholder.
These types of operator help determine an object's type, and do so how?
TYPE TESTING OPERATORS (becoming more like English). The "is" operator returns true is a variable IS a certain data type. The "as" operator converts a variable to another data type (if possible).
What can compact if-else statements to single lines of code?
TERNARY OPERATORS.
You create a constant by ... Give an example.
You create a constant by placing const before the data type of a variable. For example, "const int FREEZING = 32" You capitalize all letters in a constant. Using const prevents that variable from being changed anywhere else. Visual Studio allows for creation of universal constants.
An enumeration does this ... for example ...
An enumeration groups related constants together. For example, "const Temperatures {}"
Enumerations have what be default?
They have int data type by default.
To change enumeration data type, use this form ...
"enum Temperatures : datatype {}" (look this up in book)
An enumeration is an object. Thus, if you type the name of that enumeration, such as "Temperatures", the text will turn green. With dot notation, you then can select of the constants it contains, e.g., "Tempreatures.FREEZING".
An enumeration is an object. Thus, if you type the name of that enumeration, such as "Temperatures", the text will turn green. With dot notation, you then can select of the constants it contains, e.g., "Tempreatures.FREEZING".
There are two main types of loops
1) Loops that execute while a condition is met, and 2) Loops that execute a set number of times.
Two special keywords for loops are ...
Two special keywords for loops are break: (this means "leave the loop") and continue; (this means "return to the top of the loop code).
"continue" means ...
"continue" means, "don't read the rest of the code in this run of the loop, and return to the top of the loop as if you had completed one run."
To declare a variable do the following ... optionally, you can ...
To declare a variable, declare the variable data type and give the variable a name (e.g., int myAge;). Optionally, you can give a value when declaring a variable (int myAge = 28;).
Put variables in what form?
Put variables in camel case (first letter is lowercase). For example myAge, myFirstBirthday.
In .NET, almost everything is ...
an object.
At the base of the .NET library is ... from it ...
At the base of the .NET library is a base type called System.Object . From System.Object are derived call the other primitive data types (themselves classes), such as int, string, bool, char, decimal, etc.
Int maps to ... "Int" is a shorthand way of saying, ... for char ...
Int maps to System.Int32 . "Int" is a shorthand way of saying, "use the class System.Int32". Same for "System.Char." A char data type is actually a System.Char object. A "string" is an object (instance) derived from the System.String class.
All primitive (built-in) data types are ...
objects.
Each instance of a data type is ...
Each instance of a data type is an object. Thus, "int i = 0;" is an object. Note that int i = new int(); is equivalent to "int i = 0;"
Note that all 15 built-in data types, since ... thus have ... (give example)
Note that all 15 built-in data types, since they are objects, have built-in functions. (e.g., an instance of "int" has i.GetType();
"int i = 0;" or "int i = new int();" has these two methods (among others).
"int i = 0;" or "int i = new int();" has methods i.GetType(); and i.ToString(); and i.Equals(j);
Keep in mind that "int" and "string" are aliases for ...
Keep in mind that "int" and "string" are aliases for the data types "System.Int32" and "System.String"
The function "int myFunction(object obj){ }" is doing what?
That function is taking an object of class "System.Object" ("object" for short) and using it as an argument in myFunction, and is returning an object of data type "int".
What is the Benefit of Almost Everything Being an Object?
You can work with the 15 data types and all other objects in pretty much the same manner (e.g., using dot notation for methods/functions for all objects).
In terms of numbers, computers use ... while humans use ...
Computers use a base 2 number system (0-1), while humans use a base 10 number system (0-9).
Numbers of type "decimal" naturally work with ...
Numbers of type "decimal" naturally work with base 10 numbers, while numbers of type "double" naturally work with base 2 numbers (binary).
"double" data type objects are up to ... times faster than ... data types.
"double" data type objects are up to 10X faster than decimal data types.
Unicode is ...
... is an international standard for representing a wide number of characters from a wide number of languages.
A string data type is ...
This data type is just a series of unicode characters.
To make a string literally (e.g., to make a string containing backslashes \ display the backslashes instead of treating backslashes as escape characters), simply do this ...
... Simply precede the opening quotation mark of the strings with an @ symbol, as in: string myFilePath = @"myDocuments\photo.jpg".
Can variables change?
NO. Variables cannot change in C#. All you can do is create a new, altered variable. For example, string MyName = "Sean McGrorey" can only be used to create a new string, such as MyNewName = "Sean DeButts"
Avoiding using ... to append to strings. Instead, ...
Avoiding using "+=" to append to strings. Instead, create and use a StringBuilder object, and use its method. Creating a StringBuilder object is like creating a tool with functions. StringBuilder sb = new StringBuilder();
A variable's "scope" essentially is...
A variable's "scope" essentially is where it is visible. Effectively, where it exists as far as functionality is concerned.
In a language such as C#, C, or Java, variables have what type of scope? What does this imply?
In a language such as C#, variables have "block scope." A block of code is code within a set of braces. You also can nest scopes, just as you can next a pair of curly braces within another pair of curly braces (e.g., int myFunction(){int x = 1 {int y = 2}}
In JavaScript, variables have what type of scope? What does this imply?
In JavaScript, variables have function-level scope. There are no nested scopes within a JavaScript function. The interpreter goes through a function and lifts are variables to the top of the function
C# does not allow you to do what with two different variables in different scopes?
C# does not allow you to give declare two different variables with the same name in separate scopes.
A class is ...
A class is just a definition. It is not the object itself.
Classes define two major things (called members) ...
Classes define two major things (called members): 1) Fields: The kinds of data the objects holds. Think of all the fields (e.g., name, desription, DueDate) from your Database classes. 2) Methods, such as setDueDate(), convertToString();
Classes can inherit ... from ...
Classes can inherit attributes and methods from other classes.