Monday, September 12, 2011

The Object class

What is the purpose of the Object class?
It's purpose is to support all other classes in the hierarchy and also service lower leveled classes

How many constructors does it contain?
It contains only 1 constructor

How many methods does it contain?
the object class contains 8 methods

What is the purpose of the ToString method?
the purpose of the ToString method is to return a string that represents the object eg. a number as an integer.

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.