• 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/28

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;

28 Cards in this Set

  • Front
  • Back

code anatomy

Namespace has classes in it, classes have methods, and inside each method is a set of statements.

Declaration

The first part of every class or method

using

This is a way of listing off all of the namespaces you are using in your program.


lets you use code from the .NET Framework and predefined classes from third parties


as well as classes you can make yourself.

namespace

'using Systems.Windows' example, makes everything within available to your program and makes sure your program doesnt collide with the ones in the .NET framework or other external classes.

class

where the code is stored and starts/runs the program. Its the blueprint. How you define an object. Has properties (what they know), and methods (what they do)

public

This type of


class can be used by every other class in the project. When a variable or


method is declared as this , it can be used by classes and called by methods that are


outside of the one it’s being declared in.

new

You use this to create an instance of an object.

methods

takes input, performs some action and sometimes produces output(return value). Every method does something. What an object does

Fields

its setting a property. Fields go above and methods below. What an object knows. Declare variables outside the method for all instances to access.

statement

performs one single action. methods are made of statements that end with a (;)

entry point

static void Main() This is the first method that gets executed to run the program. When program is run, 1st statement in this method gets executed, and everything else follows. However, can change the programs entry point

objects

to create an object instance, use the new


keyword. It gets its method from its class.

static vs nonstatic

static methods dont require an instance, but non static does. When you want to create instances, don't use static keyword in either the class declaration or the method declaration

behavior

An objects behavior is defined by its methods, and it uses its fields to keep track of its state.

literal

a number that you type ito your code (ex. int = 5, 5 is the literal) every literal is automatically assigned a type

parameter

what you define in your method

argument

what you pass to the method

for

This lets you do a loop that executes three statements.



First it declares the variable it’s going to use, then there’s the statement that evaluates the variable


against a condition. The third statement


does something to the value

else

Code that starts with _____ will get executed if the if statement


preceding it fails.

if

This is one way of setting up a conditional statement in a program.


It says if one thing is true, do one thing; if not, do something else.

while

_______ loops are loops that keep on going as long as the condition in them is true.

encapsulation

make


some data private and then write code to


use that data

override

When a subclass changes the behavior of


one of the methods


that it inherited

IEnumerable<T>

used to iterate a read only collection

* It is a read only collection.
* It iterates only in forward direction.
* It does not support adding, removing objects on collection.
* It provides enumerator to iterate collection in forward direction.

IQueryable<T>

* Working with the queryable datasource
* Need to apply filter on data at the datasource
* Need to apply paging , composition
* Working with external data source
* Needs to load data in deferred way
* Need to use foreach to iterate collection

INotifyCollectionChanged

needs to be called each time an item is added or removed from the collection.



This interface has just one event:



public event NotifyCollectionChangedEventHandler CollectionChanged;

ObservableCollection<T>

only updates the client if an item is added or deleted but not if the item is changed



public static ObservableCollection<Person> CreatePeople( int count )


{


var people = new ObservableCollection<Person>();

DataConverter

is any class that implements IValueConverter, which takes two methods: Convert and ConvertBack.