Sunday, August 28, 2011

String Manipulation


3. Write about 6 of the functions listed
  • Purpose of function
  • Number of overloads (if any)
  • Parameters and their data types
  • Return type
  • Exceptions thrown by the function


Join function
Purpose -  The join function joins a number of substrings that are positioned in an array
Overloads - Join has 2 overloads
Parameters/Data Types - SourceArray (Object) & Delimiter (String)
Returns - Join returns a String
Exceptions - ArguementException

StrDup function
Purpose - is to return a specified character from a specified number of times
Overloads - StrDup has 3 overloads
Parameters/Data Types - Number (Int32) Character (Char)
Returns - StrDup returns a Strng
Exceptions - ArguementException & ArguementNullException

StrConv function
Purpose - Covert to a specified string
Overloads - 0 overloads
Parameters/Data Types - Str(String) & Conversion(StrConv) & LocaleID(Int32)
Returns - StrConv returns a string
Exceptions - ArguementException


LTrim function
Purpose - a copy of a specified string that contains no leading spaces
Overloads - 0 overloads
Parameters/Data Types - str(String)
Returns - this returns a String
Exceptions - 0 exceptions

Filter function
Purpose - to return an array that contained
Overloads - 2 overloads
Parameters/Data Types - Source(Object) & Match(String) & Include(Boolean) & Compare(CompareMethod)
Returns - Filter returns a zero based array
Exceptions - ArguementException

LCase function
Purpose - to covert a string or character to lowercase
Overloads - 2 overloads
Parameters/Data Types - Value(Char)
Returns - this returns both a string or character
Exceptions - 0 exceptions

Sunday, August 21, 2011

3. Exception Hierarchy


3. Exception Hierarchy
What are the names of the 2 exception type categories?
The 2 exception type categories are  ApplicationException and SystemException. 
When is a IndexOutOfRangeException thrown?
The exception that is thrown when an attempt is made to access an element of an array with an index that is outside the bounds of the array.

4. How to: Use the Try/Catch Block to Catch Exceptions

4. How to: Use the Try/Catch Block to Catch Exceptions
What is a Try/Catch block?
A Try/Catch block is, statements to try and then catch that statement and recover and alert the user

2. The Exception class.

2. The Exception class.
What is the purpose of the class?
Initializes a new instance of the Exception class.
What class does it directly inherit from?
it inherits from SystemObject
How many constructors are available for this class?
there are 4 constructors available for this class

1. Exceptions


1. Exceptions
What is an exception?
Exception handling is used to change the normal flow of the code execution if a specified error condition occurs.


Sunday, August 14, 2011

HashTable


A HashTable is a collection of key/value pairs that are prepared and related to the hash code of the key.
A key/value pair gets a ICollection that contains both key & value in the hashtable.

Sequence Diagrams


A Sequence Diagram is a diagram that connects all of the files and what they're doing in an operation, function etc, this shows how they all communicate with each other being with files and what they return to the form or other classes.

you can learn more about a Sequence diagram by going here
http://www.sequencediagrameditor.com/uml/sequence-diagram.htm

you can also download the StarUML program which is basic for making Sequence Diagrams.

Len, InStr & Mid functions.


What Do They Do?


Len - Returns an integer containing either the number of characters in a string or the nominal number of bytes required to store a variable.
InStr - Returns an integer specifying the start position of the first occurrence of one string within another. Returns the position of the first occurrence of one string within another.
Mid - Returns a specified number of characters from a string.

What data type do they return?
Len – integer characters in a string
InStr – return the position of the first occurrence of one string within another.
Mid - returns the characters while the Midstatement replaces the characters.


What parameters do they require?
Len - Any valid String expression or variable name
InStr - string being searched and being sought.
Mid - starting position of character, number of characters returned.

The 6 file types supported by the Windows Media Player object

The 6 files types which are supported by the Windows Media Player object are
-wmv
-avi
-wav
-mp3
-midi
-wma

Windows Media Player

Play - this function plays the appropriate media, and also plays a paused media file.

IWMPControls.play


Stop - This funtion stops the media file being played.

IWMPControls.stop


Pause - the pause function stops and hold the media file in the frame when the button was pressed.

IWMPControls.pause


FastForward - fast forward speeds up the media file to a point where you'd like to watch

IWMPControls.fastForward


Reverse - reverse is the opposite to fastforward, this function plays the media file backwards to which ever point you'd like.

IWMPControls.fastReverse