MCTS 70-536 Framework Fundamentals

Jun 2, 2009 at 4:06 PM
Edited Jun 2, 2009 at 4:41 PM

This is the studay material for the MCTS 70-536 

Manage data in a .NET Framework application by using the .NET Framework system types. (Refer System namespace)
❑ Value types:
❑ Reference types
❑ Attributes
❑ Generic types
❑ Exception classes
❑ Boxing and UnBoxing
❑ TypeForwardedToAttribute Class

Implement .NET Framework interfaces to cause components to comply with standard contracts. (Refer System namespace)
❑ IComparable interface
❑ IDisposable interface
❑ IConvertible interface

Control interactions between .NET Framework application components by using events and delegates. (Refer System namespace)
❑ Delegate class
❑ EventArgs class
❑ EventHandler delegates


Jun 2, 2009 at 4:41 PM

Value types

  1. (1) Built-in Value Types:  System.SByte, System.Byte, System.Int16, System.Double, System.Decimal, System.Char, System.Boolean, System.IntPrt, System.DataTime etc 
  2. (2) User-Defined Types (structures/structs): System.Drawing.Point
  3. (3) Enumerations: public Enumeration TerminalSource { UserInput=1, ModemInput=2}
Jun 2, 2009 at 4:56 PM

Reference Types:

Jun 2, 2009 at 4:58 PM
Edited Jun 2, 2009 at 5:07 PM

1. Which of the following are value types? (Choose all that apply.)
A. Decimal ==> System Built In
B. String
C. System.Drawing.Point ==> Enumeration
D. Integer ==> System Built In

2. You pass a value-type variable into a procedure as an argument. The procedure
changes the variable; however, when the procedure returns, the variable has not
changed. What happened? (Choose one.)
A. The variable was not initialized before it was passed in.
B. Passing a value type into a procedure creates a copy of the data. ==> A copy of the data is created when you pass a value-type variable into a procedure
C. The variable was redeclared within the procedure level.
D. The procedure handled the variable as a reference.

3. Which is the correct declaration for a nullable integer?
// C#
Nullable(int) i = null;
// C#
Nullable<int> i = null;  ==> This is the right way to declare an integer as nullable. You can also use int? i=null;
// C#
int i = null;
// C#
int<Nullable> i = null;

4. You need to create a simple class or structure that contains only value types. You
must create the class or structure so that it runs as efficiently as possible. You
must be able to pass an instance of the class or structure to a procedure without
concern that the procedure will modify it. Which of the following should you
A. A reference class
B. A reference structure
C. A value class ==> You can pass a class by value. But pass by structure is more efficiently as it is a value type.
D. A value structure  ==> A structure is a value type and won't be changed.