.NET Development Foundation: Difference between revisions
[unreviewed revision] | [unreviewed revision] |
Line 258: | Line 258: | ||
Delegates will also be covered in their section alittle later. |
Delegates will also be covered in their section alittle later. |
||
For a comparaison of value / reference types you can try [http://blogs.msdn.com/theoy/archive/2005/06/24/ValueRef.aspx this]. |
|||
====Collections==== |
====Collections==== |
Revision as of 04:49, 10 December 2007
Preface
Welcome to the 'Microsoft .NET Framework 2.0 Application Development Foundation' module.
Please give us your feedback on the module so we can improve it (see discussion page).
The preface contains information relevant to the context of the document, authors, wikibooks, etc. You can skip to the Introduction if you are primarely interested in the module content.
Contributions
This module is far from over! Please do not hesitate to improve it as you see fit.
Just a couple of pointers thow if you are a new contributor to wikibooks:
- Wikibooks are about textbooks not "standard" wikis. The project team is looking for continuous narratives that can be read from top to bottom. For somebody used to the MSDN type of documentation this can be a significant adjusment.
- Links only pages does not fit the above picture and are actively discouraged. If you create a page, be sure to have content to put on it :-)
- The administrators use templates to ask questions or notify of incomplete tasks. Those templates produce rather flashy notices that can be surprising at first. Don't worry about the look and ask for clarifications. The admins are very helpful and nice and will help you with whatever you may need.
- Code samples are very welcome and should be put in "hidden" sections to preserve the flow of the text. see example section. A sample should be kept as short as possible but the space limitations of printed material obviously do not apply here. We thus encourage you to have complete, yet clear and simple, programs so they can be directly tested and used.
- Use the discussion page for questions or comments.
Exam information and certifications
Current information on the exam can be found at MSDN Exam Information
This module is the study guide for the first exam (70-536) for obtaining many Microsoft certifications:
- Microsoft Certified Technology Specialist: .NET Framework 2.0 Web Applications
- Microsoft Certified Technology Specialist: .NET Framework 2.0 Windows_Applications
- Microsoft Certified Technology Specialist: .NET Framework 2.0 Distributed Applications
- Microsoft Certified Professionnal Developer: Web development
- Microsoft Certified Professionnal Developer: Windows development
- Microsoft Certified Professionnal Developer: Enterprise application development
Authors
William "Scott" Baker (User:Scott98390)
- If you contribute to this book, if you wish, please add your name here. The contributors for a specific article can be traced by its history.
Please note that it is not wikibook's policy to have link only pages or pages with very few text. The preferred way is to have continuous textbooks that can be read from start to finish. The first contributions to this module where in the form of separate pages for each third or forth level exam objectives. This gave way to numerous pages that are in the process of beeing merged into more consistent global pages. This process have the adverse side effect of losing references for the contributions to those detailed pages. We apologize if your texts or links have been moved in this way.
Introduction
Audience and other Wikibooks resources
The audience for this study guide are poeple professionaly interested in the .NET framework. Microsoft states in the Exam (70-536) preparation guide that "Candidates should have at least two to three years of experience developing Web-based, Microsoft Windows-based, or distributed applications by using the .NET Framework 1.0, the .NET Framework 1.1, and the .NET Framework 2.0. Candidates should have a working knowledge of Visual Studio 2005.".
We will thus assume that readers know at least one of the .NET languages (VB.NET, C#, etc.), have access to Visual Studio and have some experience working with it.
Wikibooks has other books both on VB, C# and .NET that are more introductory in nature.
Module objectives
This study guide does not aim at replacing the other resources that exists to get prepared to pass the 70-536 exam:
- we provide links to the MSDN library, we do not try to replace it. Poeple who pass the exam often note that the training kit does not cover avery aspect of the exam and that consulting the MSDN documentation is a big plus.
- we provide links to Wikipedia and other Wikimedia projects where applicable
- we do not provide testing software or lists of questions
- we do not pretend that this module replaces the recommended training kit or any other recommended material from Microsoft.
What we do provide though, even at this document's grossly incomplete stage, is:
- an exhaustive list of the objectives of the exam as stated by Microsoft
- links from all exam objectives to the corresponding MSDN library article.
- "textbook like" explanations for a growing number or topics with links to related external sources.
- and most of all, a place to put your important notes and code examples for your revision before the exam and as a reference for your professional work afterward. No training kit or library provides that in a shared and controled environment.
Finally, as part of the Wikimedia family (Wikipedia and all) the Wikibooks project has very high ethics on copyrights and general quality. Do not hesitate to correct if you find anything "wrong" in any way.
Module structure
This module is structured around the objectives set by Microsoft for the 70-536 Exam. Chapters 3 to 9 represents each of the 7 major objective categories of the exam.
For each chapter a first section covers the major concepts (topics). A second section then details each of the second, third and fourth level exam objectives for that objective category.
Eventually, we would like to have:
- an "exam questions" section for each chapter where we could discuss the kind of questions that could be asked (no cramming of course).
- an "advanced" section where we could put the more advanced material and keep the text flow of the basic sections at a level that corresponds to the knowledge required for the exam.
As of december 7th 2007:
- 24 subjects are detailed on separate pages (the subject title is the link). Most of those will eventually be integrated into the main page for a better flow of the text.
- all of the subjects are directly linked to the Microsoft Software Developers Network (MSDN) library, about 480 directly from the main page (the "MSDN" following the title is the link) and the others from their respective subpage.
- we just started to link the "topics" sections to wikipedia articles to give you a feel of how the concepts are defined and treated outside of Microsoft's world.
Some sections are relatively advanced and others are awaiting your contributions. The more advanced sections are not all at the beginning of the module.
The .NET Framework
In the certification paths where exam 70-536 "Microsoft .NET Framework 2.0 Application Development Foundation" is present, it represents the first step of the cetification process. It is thus natural to start this first study guide with a short discussion of the framework as a whole.
The definition on MSDN .NET main page is: "The .NET Framework is Microsoft's managed code programming model for building applications on Windows clients, servers, and mobile or embedded devices. Developers use .NET to build applications of many types: Web applications, server applications, smart client applications, console applications, database applications, and more".
Wikipedia's definition is: "The Microsoft .NET Framework is a software component included with the Microsoft Windows operating system. It provides a large body of pre-coded solutions to common software development requirements, and manages the execution of programs written specifically for the framework. The .NET Framework is intended to be used by most new applications created for the Windows platform"
The problem with Microsoft's definition is that it refers to a "managed code programming model" which is still Microsoft terminology. The best defintion for it: "Managed code is code that has its execution managed by the .NET Framework Common Language Runtime" (see Brad Adams blog on MSDN).
Wikipedia's definition points to the two more important aspects from a developper point of view:
- The presence of a huge set of class libraries that allows for all of the common programming tasks. Beside the sheer size of the those class libraries, they are also evolving at a rapid paste.
- The fact that the execution environment is specific to the framework. The term "virtual machine" is often used to qualify such an environment.
Those two main characteristics parallel those of the Java environment, which is the main comptetitor to the .NET framework. This module tries to help you learn the .NET framework. It will not address the .NET vs Java comparaisons and discussions.
Framework structure
The image on the right is taken from the wikipedia article on the .NET framework framework (see above).
It describes the process followed by a program written in a .NET compatible language from source code to execution. The important difference with that and more conventional programming languages (ex. C++) is the fact that the program is compiled twice. The first compilation is done from the original language to a "common intermediate language" (CIL). This is whar actually goes "in" an assembly.
The second compilation is done from the CIL to machine code at execution time by the "common language runtime" (CLR). The second compilation is done "just-in-time" by the "just-in-time" compiler.
This architecture as many direct implications for the subjects of this book. Among them:
- The "source code" of the second compilation (the CIL code) is always available to the virtual machine at runtime. This means that this code can easily be analysed at runtime, contrary to conventional compiled environment. This characteristic is the base for the reflexion functionality of the platform. Not only can we analyse the "intermediate source code" but we can actually create (emit) some of it at runtime and then do the "just-in-time" compilation and execution.
- The execution is done in the context of the CLR (this is the "managed" code concept). Put another way, we can say that the runtime always "knows" what it sends for execution, contrary to a conventional environement where the code is executed directly by the operating. This implies that you can tell the runtime to execute, or not, this or that type of code. This is the basis for code access security.
- Most of the features of the "NET languages (C#, VB, etc.) are direcly related to features of the intermediate langauge. Put another way, most of the time, the first compilation is pretty straightforward. Some of the constructs though do not have direct equivalents in the CIL (ex. properties in C# are mapped to class methods in the CIL).
We could continue like that for a long time. The point we want to make here is that a developer has much to gain from a detailed understanding of the platform, even if it is not directly mentioned as an objective of the exam.
If you want to read on the framework in Microsft documentation you can see MSDN.
The last thing we will note here is that the common language runtime (CLR) can execute in different contexts:
- ASP.NET for web applications, where it is directly linked to the Internet Information Server (IIS).
- Internet Explorer for client side web controls
- In a standalone host for console or windows applications.
By default, examples in this book will use standalone executables. This is just because they are more easy to deploy for very simple programs. This does not imply that Windows applications are preferable to web applications.
System types and collections
Exam objective: Developing applications that use system types and collections.
Topics
System types
This section will be obvious for experienced object oriented developers but some of the specific objectives of the exam are direcly related to the type system.
Types are a way to classifiy the concepts or objects of a language. The way this classification is organized is called a type system. The types themselves can also be categorized in diiferent ways by the type system.
The first way to categorize types in .NET is to make a difference between types that are part of the framework class libraries (System types) and types that will be constructed by the developer (custom types).
Writing object oriented programs can be seen as the process of defining one or more custom types. Those types are then packaged in some kind of execution unit (Assemblies in the case of .NET). The assemblies are compiled and then executed starting at some entry point that will be a specified method of one of the custom type.
Those custom types use:
- System types to execute "pre-programmed" instruction sequences
- other custom types
System types are also packaged in assemblies. The custom assemblies must reference the system assemblies in order to use the System types.
There are other ways to categorize types in .NET. One of them is by the way the objects created based on those types are mapped to the computer memory. This will give us Value types and Reference types.
Another way is by Reflection category (Class, Value types, Interfaces, Generics, etc.).
Yet another way is to distinguish the types that are directly supported by the runtime (built-in types) from those defined either in the class libraries or custom.
Those categories can also be intersected with one another, that will give us such things has "Built-in value types" or "System interfaces". Stay alert of the categorizations used when you encounter such combinations.
In the context of namaspaces the System types are the types included in the System namespace or one of its sub-namespace and Custom types (non system types) should use other namespaces.
For a peek at how Microsoft describes the .NET type system see MSDN. An then for an overview of the the class libraries (System types) see MSDN.
Value types
Value types represent one part of the Value / Reference classification of the type system.
An instance of a value type directly contains its data (value). For example an Int32 local variable has its memory allocated directly on the stack.
The value types are themselves split in 3 categories:
- The built-in value types
- User-defined value types
- Enumerations
Remember that built-in types are the types directly supported by the runtime.
All of the built-in types are value types except for Object and String.
The built-in value types consist of
- the integer types (Byte, SByte, Int16, Int32, Int64, UInt16, UInt32 and UInt64)
- the floating point types (Single and Double)
- the logical type (Boolean)
- other (Char, Decimal, InPtr and UInPtr)
All built-in value type are defined in the System namespace (ex. System.Int32) and have keywords that represent them in the .NET languages (ex. int in C#).
User-defined types are called structures (struct) in C#.
Enumerations are a way to name a set of values of an underlying integer type (signed or unsigned). As restrictions of an integer type they act as teir underlying type.
User-defined value types and Enumerations both include System types and Custom types.
An example of a System structure would be the System.Drawing.Point structure used in drawing.
An example of a System enumeration would be the System.Data.CommandType enumeration that specifies if a table is a text command, a call to a stored procedure, etc.
Reference types
Reference types represent the other part of the Value / Reference classification of the type system.
Contrary to value types an instance of a reference type does not directly contains its data (value) but instead some kind of a reference to to the memory location of that value. For example a String local variable point has memory allocated on the stack for a reference to the contained string not the string itself. In that case the string itself will be allocated on the heap and garbage collected (more on that later).
Two built-in types are considered reference types: Object and String and they are also directly referenced in the System libraries (ex. System.String) and have their own contructs in the .NET languages (ex. string in C#).
The reference types are themselves split in four categories :
- pointers
- interfaces
- arrays
- classes
We will not talk about pointers in this book because no exam objective reference them.
Classes are themselves split in three :
- user-defined classes
- boxed value types
- delegates
User-defined classes are the basic realizations of the object oriented concepts.
Obviously a lot can be said about classes but since no exam objective reference to them we will assume that the reader is already familiar with the concept and have already worked with them (in .NET or elsewhere).
You can have System classes (hundreds and hundereds of them) and custom classes (where you will code the essential of your porgram logic).
Boxed value types will be discussed a little later in the boxing / unboxing section.
Delegates will also be covered in their section alittle later.
For a comparaison of value / reference types you can try this.
Collections
For a tutorial see GotDotNet
For some "prescriptive guidance" see AspNetResources
Generics
Specialized
System Interfaces
Events and Delegates
Classes, Interfaces, and tools
System types
Exam objective: Manage data in a .NET Framework application by using the .NET Framework 2.0 system types.
(Refer System namespace)
Exception classes
- Some links to MSDN:
TypeForwardedToAttribute Class - MSDN
- For a discussion of TypeForwardToAttribute in the CLR see MSDN
- Other possible links: Marcus' Blog, NotGartner
Collections
Exam objective: Manage a group of associated data in a .NET Framework application by using collections.
(Refer System.Collections namespace - MSDN)
Collection interfaces
- IComparer interface, IEqualityComparer interface, and IKeyComparer interface
- IComparer interface - MSDN
- IEqualityComparer interface - MSDN
- IKeyComparer interface - IKeyComparer does not exist in .Net 2.0
- IDictionary interface and IDictionaryEnumerator interface
- IDictionary interface - MSDN
- IDictionaryEnumerator interface - MSDN
- IHashCodeProvider interface - MSDN - Interface is now obsolete (as of .NET 2.0)
Hashtable class - MSDN
- Used to represent a collection of key/value pairs.
CollectionBase class and ReadOnlyCollectionBase class
- CollectionBase class - MSDN
- ReadOnlyCollectionBase class -MSDN
DictionaryBase class and DictionaryEntry class
- DictionaryBase class - MSDN
- DictionaryEntry structure - MSDN
Comparer class - MSDN
Queue class - MSDN
SortedList class - MSDN
BitArray class - MSDN
Stack class - MSDN
Generic collections
Exam objective: Improve type safety and application performance in a .NET Framework application by using generic collections.
(Refer System.Collections.Generic namespace MSDN )
Collection.Generic interfaces
- see also ONDotnet
- Generic IComparable interface - MSND
- (Refer System Namespace)
- Generic ICollection interface and Generic IList interface
- Generic ICollection interface - MSDN
- Generic IList interface - MSDN
- Generic IComparer interface and Generic IEqualityComparer interface
- Generic IComparer interface - MSDN
- Generic IEqualityComparer interface - MSDN
- Generic IDictionary interface - MSDN
- Generic IEnumerable interface and Generic IEnumerator interface
- Generic IEnumerable interface - MSDN
- Generic IEnumerator interface - MSDN
- IHashCodeProvider interface - MSDN - Interface is now obsolete (as of .NET 2.0)
Generic Dictionary
- Generic Dictionary class and Generic Dictionary.Enumerator structure
- Generic Dictionary class - MSDN
- Generic Dictionary.Enumerator structure - MSDN
- Generic Dictionary.KeyCollection class and Dictionary.KeyCollection.Enumerator structure
- Generic Dictionary.KeyCollection class - MSDN
- Dictionary.KeyCollection.Enumerator structure - MSDN
- Generic Dictionary.ValueCollection class and Dictionary.ValueCollection.Enumerator structure
- Generic Dictionary.ValueCollection class - MSDN]
- Dictionary.ValueCollection.Enumerator structure - MSDN]
Generic Comparer class and Generic EqualityComparer class
- Generic Comparer class - MSDN
- Generic EqualityComparer class - MSDN
Generic KeyValuePair structure - MSDN
Generic List class, Generic List.Enumerator structure, and Generic SortedList class
- Generic List class - MSDN
- A generic list class instance is simply declared using the List<T> syntax where T is the specific type.
- Generic List.Enumerator structure - MSDN
- Generic SortedList class - MSDN
Generic Queue class and Generic Queue.Enumerator structure
- Generic Queue class - MSDN
- Generic Queue.Enumerator structure - MSDN
Generic SortedDictionary class - MSDN
- For differences between SortedList and SortedDictionary are explained see MSDN
Generic LinkedList
- A Generic Linked List represents a doubly linked list and is a general-purpose linked list. It supports enumerators and implements the ICollection interface, consistent with other classes in the .NET Framework.
- Generic LinkedList class - MSDN
- Generic LinkedList.Enumerator structure - MSDN
- Generic LinkedListNode class - MSDN
Generic Stack class and Generic Stack.Enumerator structure
- Generic Stack class - MSDN
- Generic Stack.Enumerator structure - MSDN
Specialized collections
Exam objective: Manage data in a .NET Framework application by using specialized collections.
(Refer System.Collections.Specialized namespace)
Specialized String classes
- StringCollection class - MSDN
- StringDictionary class - MSDN
- StringEnumerator class - MSDN
Specialized Dictionary classes
- HybridDictionary class - MSDN
- IOrderedDictionary interface and OrderedDictionary class
- IOrderedDictionary Interface - MSDN
- OrderedDictionary class - MSDN
- ListDictionary class - MSDN
Named collections
- NameObjectCollectionBase class - MSDN
- NameObjectCollectionBase.KeysCollection class - MSDN
- NameValueCollection class - MSDN
CollectionsUtil class
CollectionsUtil class - MSDN
BitVector32 structure and BitVector32.Section structure
- BitVector32 structure - MSDN
- BitVector32.Section structure - MSDN
Standard interfaces
Exam objective: Implement .NET Framework interfaces to cause components to comply with standard contracts.
(Refer System namespace)
IComparable interface - MSDN
- The IComparable interface defines a comparison method that a value type or class implements to create a type-specific comparison method
IDisposable interface - MSDN
- The IDispose interface can be used to explicitly release unmanaged resources in custom classes. The consumer of an object can call this method when the object is no longer needed.
- The .Net garbage collector releases memory allocated to managed objects when they are no longer used, however, it is not possible to predict when garbage collection will occur and it has no knowledge of unmanaged resources such as window handles, or open files and streams.
IConvertible interface - MSDN
ICloneable interface - MSDN
INullableValue interface - MSDN
IEquatable interface - MSDN
IFormattable interface - MSDN
Events and delegates
Exam objectives: Control interactions between .NET Framework application components by using events and delegates.
(Refer System namespace)
EventArgs class - MSDN
EventHandler delegates - MSDN
Services, threading, and application domains
Exam objective: Implementing service processes, threading, and application domains in a .NET Framework application
Topics
Services
Mutithreading
Application Domain
Classes, Interfaces, and tools
Implement, install, and control a service
Exam objective: Implement, install, and control a service
(Refer System.ServiceProcess namespace)
Inherit from ServiceBase class
ServiceController class and ServiceControllerPermission class
- ServiceController class - MSDN
- ServiceControllerPermission class - MSDN
ServiceInstaller and ServiceProcessInstaller class
- ServiceInstaller - MSDN
- ServiceProcessInstaller class - MSDN
ServiceChangeDescription structure and ServiceChangeReason enumeration
- SessionChangeDescription structure - MSDN
- SessionChangeReason enumeration - MSDN
Develop multithreaded applications
Exam objective: Develop multithreaded .NET Framework applications
(Refer System.Threading namespace)
Thread class - MSDN
ThreadPool class - MSDN
ThreadStart delegate, ParameterizedThreadStart delegate, and SynchronizationContext class
Timeout class, Timer class, TimerCallback delegate, WaitCallback delegate, WaitHandle class, and WaitOrTimerCallback delegate
- Timeout class - MSDN
- Timer class - MSDN
- TimerCallback delegate - MSDN
- WaitCallback delegate - MSDN
- WaitHandle class - MSDN
- WaitOrTimerCallback delegate - MSDN
ThreadExceptionEventArgs class and ThreadExceptionEventHanlder class
- ThreadExceptionEventArgs class - MSDN
- ThreadExceptionEventHandler class - MSDN
ThreadState enumeration and ThreadPriority enumeration
- ThreadState enumeration - MSDN
- ThreadPriority enumeration - MSDN
ReaderWriterLock class - MSDN
AutoResetEvent class and ManualResetEvent class
- AutoResetEvent class - MSDN
- ManualResetEvent class - MSDN
IAsyncResult interface and ICancelableAsyncResult interface
- (Refer System namespace)
- IAsyncResult interface - MSDN
- ICancelableAsyncResult interface - MSDN
EventWaitHandle class, RegisterWaitHandle class, SendOrPostCallback delegate, and IOCompletionCallback delegate
- EventWaitHandle class - MSDN
- RegisterWaitHandle class - MSDN
- This is a typo in the exam list of objectives and the training kit. The term RegisterWaitForSingleObject should be saerch instead (see KB)
- SendOrPostCallback delegate - MSDN
- IOCompletionCallback delegate - MSDN
Interlocked class, NativeOverlapped structure, and Overlapped class
- Interlocked class - MSDN
- NativeOverlapped structure - MSDN
- Overlapped class - MSDN
ExecutionContext class, HostExecutionContext class, HostExecutionContext manager, and ContextCallback delegate
- ExecutionContext class - MSDN
- HostExecutionContext class - MSDN
- HostExecutionContext manager - MSDN
- In fact was is refered to here is the HostExecutionContextManager class
- ContextCallback delegate - MSDN
LockCookie structure, Monitor class, Mutex class, and Semaphore class MSDN]
- LockCookie structure - MSDN
- Monitor class - MSDN
- Mutex class - MSDN
- Semaphore class - MSDN
Using applications domains
Exam objective: Create a unit of isolation for common language runtime in a .NET Framework application by using application domains
(Refer System namespace)
Create an application domain - MSDN
- An application domain is a division of a process into multiple parts. Applications running in different application domains are as isolated as they would be in different processes.
- Application domains are easier to maintain and are faster because it is easier to communicate between application domains than between processes. An application domain can hold multiple assemblies.
Unload an application domain - MSDN
Configure an application domain - MSDN
Retrieve setup information from an application domain - MSDN
Load assemblies into an application domain - MSDN
Configuration, diagnostic, management, and installation
Exam objective: Embedding configuration, diagnostic, management, and installation features into a .NET Framework application
Topics
Configuration management
.NET framework installer
Event log
MSDN's definition is "Windows event logs allow your applications and components to record information about important events. You can use these records to audit access to your system, troubleshoot problems, and re-create usage patterns"
For a general discussion see MSDN
For specifics on the EventLog class and some cautions about its use see MSDN
System processes
Performance monitoring
Debugging and tracing
Management information and events
Classes, Interfaces, and tools
Embed configuration management
Exam objective: Embed configuration management functionality into a .NET Framework application.
(Refer System.Configuration namespace)
Configuration class and ConfigurationManager class
- Configuration class - MSDN
- ConfigurationManager class - MSDN
ConfigurationSettings class, ConfigurationElement class, ConfigurationElementCollection class, and ConfigurationElementProperty class
- ConfigurationSettings class - MSDN
- ConfigurationElement class - MSDN
- ConfigurationElementCollection class - MSDN
- ConfigurationElementProperty class - MSDN
Implement IConfigurationSectionHandler interface - MSDN
ConfigurationSection class, ConfigurationSectionCollection class, ConfigurationSectionGroup class, and ConfigurationSectionGroupCollection class
- ConfigurationSection class - MSDN
- ConfigurationSectionCollection class - MSDN
- ConfigurationSectionGroup class - MSDN
- ConfigurationSectionGroupCollection - MSDN
Implement ISettingsProviderService interface - MSDN
Implement IApplicationSettingsProvider interface - MSDN
ConfigurationValidationBase class
- No direct result on MSDN - to be checked
Implement IConfigurationSystem interface - MSDN
Create custom installer and configure application
Exam objective: Create a custom Microsoft Windows Installer for .NET Framework components by using the System.Configuration.Install namespace, and configure the .NET Framework applications by using configuration files, environment variables, and the .NET Framework Configuration tool (Mscorcfg.msc).
- For a "cookbook" on for the procedures discussed in this section see MSDN and the corresponding How-To section.
Installer class - MSDN
Configure which runtime version a .NET Framework application should use - MSDN
Configure where the runtime should search for an assembly - MSDN
Configure the location of an assembly and which version of the assembly to use - MSDN and MSDN
Direct the runtime to use the DEVPATH environment variable when searching for assemblies - MSDN
AssemblyInstaller class - MSDN
ComponentInstaller class - MSDN
Configure a .NET Framework application by using the .NET Framework Configuration tool (Mscorcfg.msc) - MSND
ManagedInstaller class - MSDN
InstallContext class - MSDN
InstallerCollection class - MSDN
Implement IManagedInstaller interface - MSDN
InstallEventHandler delegate - MSDN
Configure concurrent garbage collection - MSDN
Register remote objects by using configuration files - MSDN
Manage an event log
Exam objective: Manage an event log by using the System.Diagnostics namespace
EventLog class - MSDN
EventSourceCreationData class - MSDN
Write to an event log
Read from an event log
Create a new event log
You create an EventLog by creating the first event source that writes to that log.
The two simplest way to do this are:
- Use the EventLog.CreateEventSource method
- Create an EventLog instance, specify a source and then write to the log. The actual creation takes place on execution of the first write.
Note that there is no "EventSource" class in the System.Diagnostics namespace even thow an object representing the source is created in the registry.
C# EventLog creation Example
using System; using System.Collections.Generic; using System.Text; using System.Diagnostics; namespace EventLogLab1 { class Program { static void Main(string[] args) { try { EventLog log1 = new EventLog("EvtLab2Log"); log1.Source = "EvtLab2Source"; // Actual creation happens next log1.WriteEntry("Example message", EventLogEntryType.Information, 123, 1); } catch (Exception e) { Console.WriteLine(e.Message); } Console.WriteLine("Press ENTER to finish"); Console.ReadLine(); } } }
The recommended way, which does not seem to be covered on the Training Kit (so probably not on the exam) is to use the EventLogInstaller class during the installation of the application. For reference purposes see MSDN
Manage processes and monitor performance
Exam objective: Manage system processes and monitor the performance of a .NET Framework application by using the diagnostics functionality of the .NET Framework 2.0.
(Refer System.Diagnostics namespace)
Get a list of all running processes.
- Process class - MSDN
- For example code for GetCurrentProcess(), GetProcessesByName(), GetProcesses(), and GetProcessById() see MSDN
Retrieve information about the current process - MSDN
Get a list of all modules loaded by a process
- The Process.Modules property returns a stronlgy-typed collection of ProcessModule objects that represent the Process' currently loaded modules.
- For the Process.Modules property see MSDN
- For the ProcessModule class see MSDN
PerformanceCounter class, PerformanceCounterCategory, and CounterCreationData class
- PerformanceCounter class - MSDN
- PerformanceCounterCategory - MSDN
- CounterCreationData class - MSDN
Start a process both by using and by not using command-line arguments.
StackTrace class - MSDN
StackFrame class - MSDN
Debug and Trace
Exam objective: Debug and trace a .NET Framework application by using the System.Diagnostics namespace.
Debug class and Debugger class
Trace class - MSDN
CorrelationManager class - MSDN
TraceListener class - MSDN
TraceSource class - MSDN
TraceSwitch class - MSDN
XmlWriterTraceListener class - MSDN
DelimitedListTraceListener class - MSDN
EventlogTraceListener class - MSDN
Debugger attributes - MSDN
- DebuggerBrowsableAttribute class - MSDN
- DebuggerDisplayAttribute class - MSDN
- DebuggerHiddenAttribute class - MSDN
- DebuggerNonUserCodeAttribute class - MSDN
- DebuggerStepperBoundaryAttribute class - MSDN
- DebuggerStepThroughAttribute class - MSDN
- DebuggerTypeProxyAttribute class - MSDN
- DebuggerVisualizerAttribute class - MSDN
Embed management information
Exam objective: Embed management information and events into a .NET Framework application.
(Refer System.Management namespace - MSDN)
- ManagementObjectSearcher class - MSDN
- Retrieve information about all network connections
- Example to be provided
ManagementQuery class - MSDN
EventQuery class - MSDN
- ObjectQuery class - MSDN
Subscribe to management events by using the ManagementEventWatcher class - MSDN
Serialization and Input/Output
Exam objective: Implementing serialization and input/output functionality in a .NET Framework application
Topics
Serialization
Wikipedia's definition for serialiation is : "in the context of data storage and transmission, serialization is the process of saving an object onto a storage medium (such as a file, or a memory buffer) or to transmit it across a network connection link in binary form".
The problem that is addressed here is that an object is created by a running process and is thus bound to the lifetime of that process instance. If for whatever reason, and there can be many, you want to "transport" the object in the context of another process instance you've got a problem, that you solve by "saving" the state of you object in the original process and "restoring" it in the destination process. This "saving" part is called serialization and the "restoring" part is caled deserialization.
Serializable attribute
An object is serializable if it's class name is be prefixed with the [Serializable] attribute.
Object Serialization
One can use the BinaryFormatter class to serialize an object. To serialize, use the BinaryFormatter's Serialize() method which takes a stream and a serializable object as parameters. To deserialize, use the BinaryFormatter's Deserialize() method which takes a stream as a parameter and returns a object that can be cast back to the original object type. Remember to close streams after you use them by calling the stream's Close() method.
XML Serialization
One can use the XmlSerializer class to serialize an object. To serialize, use the XmlSerializer's Sserialize() method which takes a stream and a serializable object as parameters. To deserialize, use the XmlSerializer's Deserialize() method which takes a stream as a parameter and returns a object that can be cast back to the original object type. Remember to close streams after you use them by calling the stream's Close() method.
For an overview of XML and SOAP serialization see MSDN
Custom Serialization
The ISerializable interface allows an object to control its own serialization and deserialization.
Readers
Writers
Formatters
A formatter is used to serialize objects into streams.
Streams
File IO
Managing Byte Streams
Compression
Isolated storage
For a general discussion on IsolatedStorage tasks see MSDN
Classes, Interfaces, and tools
Serialize and deserialize
Exam objective: Serialize or deserialize an object or an object graph by using runtime serialization techniques.
(Refer System.Runtime.Serialization namespace)
Serialization interfaces
IDeserializationCallback interface - MSDN
IFormatter interface and IFormatterConverter interface
- IFormatter interface - MSDN
- IFormatterConverter interface - MSDN
ISerializable interface - MSDN
Serilization attributes
- For some serialization attributes exemple see MSDN
OnDeserializedAttribute class and OnDeserializingAttribute class
- OnDeserializedAttribute class - MSDN
- OnDeserializingAttribute class - MSDN
OnSerializedAttribute class and OnSerializingAttribute class
- OnSerializedAttribute class - MSDN
- OnSerializingAttribute class - MSDN
OptionalFieldAttribute class - MSDN
SerializationEntry structure and SerializationInfo class
SerializationEntry structure - MSDN
SerializationInfo class - MSDN
ObjectManager class
ObjectManager class - MSDN
Formatter class, FormatterConverter class, and FormatterServices class
Formatter class - MSDN
FormatterConverter class - MSDN
FormatterServices class - MSDN
StreamingContext structure
StreamingContext structure - MSDN
XML Serialization
Exam objective: Control the serialization of an object into XML format by using the System.Xml.Serialization namespace.
XmlSerializer class - MSDN
- Exam objective: Serialize and deserialize objects into XML format by using the XmlSerializer class
Control serialization by using serialization attributes - MSDN
- For a list of attributes for controlling serialization see MSDN
Implement XML Serialization interfaces to provide custom formatting for XML serialization - MSDN
Delegates and event handlers are provided by the System.Xml.Serialization namespace - MSDN
Custom serialization
Exam objective: Implement custom serialization formatting by using the Serialization Formatter classes.
SoapFormatter clas - MSDN
- (Refer System.Runtime.Serialization.Formatters.Soap namespace)
BinaryFormatter class - MSDN
- (Refer System.Runtime.Serialization.Formatters.Binary namespace
File system classes
Exam objective: Access files and folders by using the File System classes.
(Refer System.IO namespace)
File class and FileInfo class
- For common IO tasks see MSDN
- File class - MSDN
- FileInfo class - MSDN
Directory class and DirectoryInfo class
- Directory class - MSDN
- DirectoryInfo class - MSDN
DriveInfo class and DriveType enumeration
- DriveInfo class - MSDN
- DriveType enumeration - MSDN
FileSystemInfo class and FileSystemWatcher class
ErrorEventArgs class and ErrorEventHandler delegate
- ErrorEventArgs class - MSDN
- ErrorEventHandler delegate - MSDN
RenamedEventArgs class and RenamedEventHandler delegate
- RenamedEventArgs class - MSDN
- RenamedEventHandler delegate - MSDN
Byte streams
Exam objective: Manage byte streams by using Stream classes.
(Refer System.IO namespace)
FileStream class - MSDN
Stream class - MSDN
- System.IO.Stream is the abstract base class that all other streams inherit from. It is not possible in instantiate a Stream class. Instead use one of the other classes that derive from Stream.
- In terms of the 70-536 exam objectives, the most important classes that inherit from Stream are:
- System.IO.FileStream
- System.IO.MemoryStream
- System.IO.Compression.DeflateStream
- System.IO.Compression.GZipStream
- System.Security.Cryptography.CryptoStream
- System.IO.BufferedStream
- For a complete list of classes that inherit from Stream see MSDN.
- For a discussion on File and Stream IO see MSDN.
MemoryStream class - MSDN
BufferedStream class - MSDN
Reader and Writer classes
Exam objective: Manage the .NET Framework application data by using Reader and Writer classes.
(Refer System.IO namespace)
StringReader class and StringWriter class
TextReader class and TextWriter class
StreamReader class and StreamWriter class
BinaryReader class and BinaryWriter class
- BinaryReader class - MSDN
- BinaryWriter class - MSDN
Compression and isolated storage
Exam objective: Compress or decompress stream information in a .NET Framework application and improve the security of application data by using isolated storage.
(Refer System.IO.Compression namespace)
(Refer System.IO.IsolatedStorage namespace)
IsolatedStorageFile class - MSDN
IsolatedStorageFileStream class - MSDN
DeflateStream class - MSDN
GZipStream class - MSDN
Security
Exam objective: Improving the security of the .NET Framework applications by using the .NET Framework 2.0 security features
Topics
Code access security
Code access security, CAS, allows the control of various permissions granted to specific managed applications. MSDN
Permissions allow access system resources. A permission set is a collection of permissions. A code group relates exactly one permission set to exactly one evidence type. Evidence is used to identify an assembly. Evidence types can include the application directory, cryptographic hash of the assembly, publisher's digital signature, site from which the assembly was downloaded, cryptographic strong name of the assembly, URL from which the assembly was downloaded, and the security zone in which the assembly is running. Security zones include the computer zone, local intranet zone, Internet zone, trusted site, and untrusted sites. See the Internet options security tab in Internet Explorer to view various security zones. An assembly can be associated with multiple code groups. Permission sets can be associated with multiple code groups.
A security policy is a logical grouping of code groups and permission sets. An untrusted managed assembly must pass through four security policies: The Enterprise security policy, machine security policy, user security policy, and application domain security policy. Any one of these security policies can deny an untrustrd managed assembly permissions.
Classes, interfaces, and tools
Implement code access security
Exam objective: Implement code access security to improve the security of a .NET Framework application.
(Refer System.Security namespace)
SecurityManager class - MSDN
CodeAccessPermission class - MSDN
Modify the Code Access security policy at the machine, user, and enterprise policy level by using the Code Access Security Policy tool (Caspol.exe) - MSDN
PermissionSet class, NamedPermissionSet class, and PermissionSetCollection class
- PermissionSet class - MSDN
- NamedPermissionSet class - MSDN
- PermissionSetCollection class
- There does not seem to be such a thing, to be investigated...
Standard Security interfaces
- IEvidenceFactory interface - MSDN
- IPermission interface - MSDN
Implement access control
Exam objective: Implement access control by using the System.Security.AccessControl classes.
DirectorySecurity class, FileSecurity class, FileSystemSecurity class, and RegistrySecurity class
- DirectorySecurity class - MSDN
- FileSecurity class - MSDN
- FileSystemSecurity class - MSDN
- RegistrySecurity class - MSDN
AccessRule class - MSDN
AuthorizationRule class and AuthorizationRuleCollection class
- AuthorizationRule class - MSDN
- AuthorizationRuleCollection class - MSDN
CommonAce class, CommonAcl class, CompoundAce class, GeneralAce class, and GeneralAcl class
- CommonAce class - MSDN
- CommonAcl class - MSDN
- CompoundAce class - MSDN
- GeneralAce class
- Does not seem to be a class like that, to be investigated...
- GeneralAcl class
- Neither this one???
AuditRule class - MSDN
MutexSecurity class, ObjectSecurity class, and SemaphoreSecurity class
- MutexSecurity class - MSDN
- ObjectSecurity class - MSDN
- SemaphoreSecurity class - MSDN
Implement custom authentication scheme
Exam objective: Implement a custom authentication scheme by using the System.Security.Authentication classes.
(Refer System.Security.Authentication namespace - MSDN)
For a refernece on custom authentification schemes see MSDN
Encrypt, decrypt and hash data
Exam objective: Encrypt, decrypt, and hash data by using the System.Security.Cryptography classes.
(Refer System.Security.Cryptography namespace)
DES class and DESCryptoServiceProvider class
- DES class - MSDN
- DESCryptoServiceProvider class - MSDN
HashAlgorithm class - MSDN
DSA class and DSACryptoServiceProvider class
- DSA class - MSDN
- DSACryptoServiceProvider class - MSDN
SHA1 class and SHA1CryptoServiceProvider class
- SHA1 class - MSDN
- SHA1CryptoServiceProvider class - MSDN
TripleDES and TripleDESCryptoServiceProvider class
- TripleDES - MSDN
- TripleDESCryptoServiceProvider class - MSDN
MD5 class and MD5CryptoServiceProvider class
- MD5 class - MSDN
- MD5CryptoServiceProvider class - MSDN
RSA class and RSACryptoServiceProvider class
- RSA class - MSDN
- RSACryptoServiceProvider class - MSDN
RandomNumberGenerator class - MSDN
CryptoStream class - MSDN
CryptoConfig class - MSDN
RC2 class and RC2CryptoServiceProvider class
- RC2 class - MSDN
- RC2CryptoServiceProvider class - [RC2CryptoServiceProvider class MSDN]
AssymetricAlgorithm class
- Basically nothing found on MSDN under that name, an investigation is required...
ProtectedData class and ProtectedMemory class
- ProtectedData class - MSDN
- ProtectedMemory class - MSDN
RijndaelManaged class and RijndaelManagedTransform class
- RijndaelManaged class - MSDN
- RijndaelManagedTransform class - MSDN
CspParameters class - MSDN
CryptoAPITransform class - MSDN
Hash-based Message Authentication Code (HMAC) - MSDN
- HMACMD5 class - MSDN
- HMACRIPEMD160 class - MSDN
- HMACSHA1 class - MSDN
- HMACSHA256 class - MSDN
- HMACSHA384 class - MSDN
- HMACSHA512 class - MSDN
Control permissions
Exam objective: Control permissions for resources by using the System.Security.Permission classes.
(Refer System.Security.Permission namespace)
SecurityPermission class - MSDN
PrincipalPermission class - MSDN
FileIOPermission class - MSDN
- You can also set the FileIoPermisson attribute at assembly level or class level. Be then aware about the SecurityAction enumerations:
- SecurityAction.RequestRefuse: specifies the operations that should not be granted.
- SecurityAction.RequestMinumum: request for a minimum set of permissions. If not given, the app will not execute.
StrongNameIdentityPermission class - MSDN
UIPermission class - MSDN
UrlIdentityPermission class - MSDN
PublisherIdentityPermission class - MSDN
GacIdentityPermission class - MSDN
FileDialogPermission class - MSDN
DataProtectionPermission class - MSDN
EnvironmentPermission class - MSDN
IUnrestrictedPermission interface - MSDN
RegistryPermission class - MSDN
IsolatedStorageFilePermission class - MSDN
KeyContainerPermission class - MSDN
ReflectionPermission class - MSDN
StorePermission class - MSDN
SiteIdentityPermission class - MSDN
ZoneIdentityPermission class - MSDN
Control code privileges
Exam objective: Control code privileges by using System.Security.Policy classes.
(Refer System.Security.Policy namespace)
ApplicationSecurityInfo class and ApplicationSecurityManager class
- ApplicationSecurityInfo class - MSDN
- ApplicationSecurityManager class - MSDN
ApplicationTrust class and ApplicationTrustCollection class
- ApplicationTrust class - MSDN
- ApplicationTrustCollection class - MSDN
Evidence class and PermissionRequestEvidence class
- Evidence class - MSDN
- PermissionRequestEvidence class - MSDN
CodeGroup class, FileCodeGroup class, FirstMatchCodeGroup class, NetCodeGroup class, and UnionCodeGroup class
- CodeGroup class - MSDN
- FileCodeGroup class - MSDN
- FirstMatchCodeGroup class - MSDN
- NetCodeGroup class - MSDN
- UnionCodeGroup class - MSDN
Condition classes
- AllMembershipCondition class - MSDN
- ApplicationDirectory class and ApplicationDirectoryMembershipCondition class
- ApplicationDirectory class - MSDN
- ApplicationDirectoryMembershipCondition class - MSDN
- GacMembership class and GacMembershipCondition class
- GacMembership class
- No search results on MSDN!? a little investigation required here.
- GacMembershipCondition class - MSDN
- Hash class and HashMembershipCondition class
- Hash class - MSDN
- HashMembershipCondition class - MSDN
- Publisher class and PublisherMembershipCondition class
- Publisher class - MSDN
- PublisherMembershipCondition class - MSDN
- Site class and SiteMembershipCondition class
- Site class - MSDN
- SiteMembershipCondition class - MSDN
- StrongName class and StrongNameMembershipCondition class
- StrongName class - MSDN
- StrongNameMembershipCondition class - MSDN
- Url class and UrlMembershipConditon class
- Url class - MSDN
- UrlMembershipConditon class
- To be investigated, no search result on MSDN except exam objective :-)
- Zone class and ZoneMembershipCondition class
- Zone class - MSDN
- ZoneMembershipCondition class - MSDN
PolicyLevel class and PolicyStatement class
- PolicyLevel class - MSDN
- PolicyStatement class - MSDN
IApplicationTrustManager interface, IMembershipCondition interface, and IIdentityPermissionFactory interface
- IApplicationTrustManager interface - MSDN
- IMembershipCondition interface - MSDN
- IIdentityPermissionFactory interface - MSDN
Access and modifiy identity information
Exam objective: Access and modify identity information by using the System.Security.Principal classes.
(Refer System.Security.Principal namespace)
GenericIdentity class and GenericPrincipal class
- GenericIdentity class - MSDN
- GenericPrincipal class - MSDN
WindowsIdentity class and WindowsPrincipal class
- WindowsIdentity class - MSDN
- WindowsPrincipal class - MSDN
NTAccount class and SecurityIdentifier class
- NTAccount class - MSDN
- SecurityIdentifier class - MSDN
IIdentity interface and IPrincipal interface
- IIdentity interface - MSDN
- IPrincipal interface - MSDN
WindowsImpersonationContext class - MSDN
IdentityReference class and IdentityReferenceCollection class
- IdentityReference class - MSDN
- IdentityReferenceCollection class - MSDN
Interoperability, Reflection, and Mailing
Exam objective: Implementing interoperability, reflection, and mailing functionality in a .NET Framework application
Topics
Interoperability
Reflection
The wikipedia definition for reflexion in computer science is: "The process by which a computer program of the appropriate type can be modified in the process of being executed".
The concept is implemented extensively in .NET because a lot of information is maintained at the intermediate language (MSIL) level.
Among other things you can:
- get information about running assembly or assembly constituants (modules, classes, methods, etc.), this is particularly usefull for dynamically loaded assemblies that are not known at compile time.
- put custom attributes in your code and retreive those attributes at run time
- dynamically invoke methods
- "emit" and execute MSIL code at run time
Mailing
Classes, Interfaces, and tools
COM interoperability
Exam objective: Expose COM components to the .NET Framework and .NET Framework components to COM
(Refer System.Runtime.InteropServices namespace)
Exposing COM Components to the .NET Framework
- First there is an article in the .NET developers guide that covers the first part of this section, see MSDN
Import a type library as an assembly - MSDN
- Add references to type libraries
- Same link as above, see second paragraph.
- Type Library Importer (Tlbimp.exe) - MSDN
- Generate interop assemblies from type libraries - MSDN
- Imported Library Conversion - MSDN
- Imported Module Conversion - MSDN
- Imported Type Conversion - MSDN
- Imported Member Conversion - MSDN
- Imported Parameter Conversion - MSDN
- TypeConverter class - MSDN
Create COM types in managed code - MSDN
Compile an interop project - MSDN
Deploy an interop application - MSDN
Exposing .NET Framework Components to COM
- The rest of the objectives of that section directly refers to MSDN
Qualify the .NET Framework types for interoperation - MSDN
Apply Interop attributes, such as the ComVisibleAttribute class - MSDN
Package an assembly for COM - MSDN
Deploy an application for COM access - MSDN
Call DLL functions
Exam objective: Call unmanaged DLL functions in a .NET Framework application, and control the marshalling of data in a .NET Framework application.
(Refer System.Runtime.InteropServices namespace)
Platform Invoke - MSDN
Create a class to hold DLL functions - MSDN
Create prototypes in managed code - MSDN
- DllImportAttribute class - MSND
Call a DLL function - MSDN
- Look for "P/Invoke" on the internet.
- A good reference is: http://www.pinvoke.net/
- Some short hints:
- For the DllAttribute "CharSet", Logically, CharSet.Auto is the most secure way as this will autodetect the Charset used. The CharSet can be ANSI(Win95/Win98/ME) or Unicode (Win2000/WinXP)
- GetEntryPoint: There could be one tricky question as the EntryPoint states the method that should be called. In case the name of the method used differs from the method to be called, this flag is necessary.
Call a DLL function in special cases, such as passing structures and implementing callback functions
- Same link as above
- Passing structures - MSDN
- Implementing callback functions - MSDN
Create a new Exception class and map it to an HRESULT - MSDN
Default marshaling behavior - MSDN
Marshal data with Platform Invoke - MSDN
Marshal data with COM Interop - MSDN
MarshalAsAttribute class and Marshal class
- MarshalAsAttribute class - MSDN
- Marshal class - MSDN
Implement Reflexion
Exam objective: Implement reflection functionality in a .NET Framework application (refer System.Reflection namespace), and create metadata, Microsoft intermediate language (MSIL), and a PE file by using the System.Reflection.Emit namespace.
Assembly class -MSDN
Assembly attributes - MSDN
- AssemblyAlgorithmIdAttribute class - [AssemblyAlgorithmIdAttribute class MSDN]
- AssemblyCompanyAttribute class - MSDN
- AssemblyConfigurationAttribute class - MSDN
- AssemblyCopyrightAttribute class - MSDN
- AssemblyCultureAttribute class - MSDN
- AssemblyDefaultAliasAttribute class - MSDN
- AssemblyDelaySignAttribute class - MSDN
- AssemblyDescriptionAttribute class - MSDN
- AssemblyFileVersionAttribute class - MSDN
- AssemblyFlagsAttribute class - MSDN
- AssemblyInformationalVersionAttribute class - MSDN
- AssemblyKeyFileAttribute class - MSDN
- AssemblyTitleAttribute class - MSDN
- AssemblyTrademarkAttribute class - MSDN
- AssemblyVersionAttribute class - MSDN
Info classes
- ConstructorInfo class - MSDN
- MethodInfo class - MSDN
- MemberInfo class - MSDN
- PropertyInfo class - MSDN
- FieldInfo class - MSDN
- EventInfo class - MSDN
- LocalVariableInfo class - MSDN
Binder class and BindingFlags - MSDN
MethodBase class and MethodBody class
- MethodBase class - MSDN
- MethodBody class - MSDN
Builder classes
- AssemblyBuilder class - MSDN
- ConstructorBuilder class - MSDN
- EnumBuilder class - MSDN
- EventBuilder class - MSDN
- FieldBuilder class - MSDN
- LocalBuilder class - MSDN
- MethodBuilder class - MSDN
- ModuleBuilder class - MSDN
- ParameterBuilder class - MSDN
- PropertyBuilder class - MSDN
- TypeBuilder class - MSDN
Send Electronic mail
Exam objective: Send electronic mail to a Simple Mail Transfer Protocol (SMTP) server for delivery from a .NET Framework application.
(Refer System.Net.Mail namespace)
MailMessage class - MSDN
MailAddress class and MailAddressCollection class
- MailAddress class - MSDN
- MailAddressCollection class - MSDN
SmtpClient class, SmtpPermission class, and SmtpPermissionAttribute class
- SmtpClient class - MSDN
- SmtpPermission class - MSDN
- SmtpPermissionAttribute class - MSDN
Attachment class, AttachmentBase class, and AttachmentCollection class
- Attachment class - MSDN
- AttachmentBase class - MSDN
- AttachmentCollection class - MSDN
SmtpException class, SmtpFailedReceipientException class, and SmtpFailedReceipientsException class
- SmtpException class - MSDN
- SmtpFailedReceipientException class - MSDN
- Please note that there is a typo in the exam objective page here, they use SmtpFailedReceipientException insteand of SmtpFailedRecipientException.
- SmtpFailedRecipientsException class - MSDN
- Same typo then above
SendCompleteEventHandler delegate
- Well MSDN does not seem to know about this one except for exam and course objective and a deprecated object in DirectX. A little investigation is needed.
LinkedResource class and LinkedResourceCollection class
- LinkedResource class - MSDN
- LinkedResourceCollection class - MSDN
AlternateView class and AlternateViewCollection class
- AlternateView class - MSDN
- AlternateViewCollection class - MSDN
Globalization, Drawing, and Text manipulation
Exam objective: Implementing globalization, drawing, and text manipulation functionality in a .NET Framework application
Topics
Globalization
Drawing
Text manipulation
Text manipulation, in the context of the exam objectives, covers 3 main subjects: string building, regular expressions and text encoding. We look at each in the follwing paragraphs.
String and StringBuilder classes
Text manipulation starts with the representation of a string which is done via the String class. No specific exam objective mentions the String class but we added a section for it because you must understand some of its specific caracteristics.
Next comes the StringBuilder class that serves for efficent construction.
Regular expressions
The Regex, Match and Group classes together implement the regular expressions support in the .NET framework.
Regular expressions are a world by themselves and have been around for quite some time.
There is a wikibook on regular expressions which, among other things, point to this Tutorial.
Regular expressions support in .NET basically allows for:
- testing the match of a string to a regex pattern (Regex.IsMatch method)
- extracting the substrings that "match" part of a pattern (Regex.Match method with Match and Group classes).
Text encoding
Classes, Interfaces, and tools
Format data based on culture information.
(Refer System.Globalization namespace)
Access culture and region information
Exam objective: Access culture and region information in a .NET Framework application
CultureInfo class - MSDN
CultureTypes enumeration - MSDN
RegionInfo class - MSDN
Format date and time values based on the culture.
DateTimeFormatInfo class - MSDN
Format number values based on the culture.
NumberFormatInfo class - MSDN
NumberStyles enumeration - MSDN
Perform culture-sensitive string comparison.
CompareInfo class - MSDN
CompareOptions enumeration - MSDN
Custom culture
Exam objective: Build a custom culture class based on existing culture and region classes
CultureAndRegionInfoBuilder class - MSDN
CultureAndRegionModifier enumeration
- No result for search on MSDN?
System.Drawing namespace
Exam objective: Enhance the user interface of a .NET Framework application by using the System.Drawing namespace.
Brushes, Pens, Colors and Fonts
Exam objective: Enhance the user interface of a .NET Framework application by using brushes, pens, colors, and fonts
Brush class - MSDN
Brushes class - MSDN
SystemBrushes class - MSDN
TextureBrush class - MSDN
Pen class - MSDN
Pens class - MSDN
SystemPens class - MSDN
SolidBrush class - MSDN
Color structure - MSDN
ColorConverter class - MSDN
ColorTranslator class - MSDN
SystemColors class - MSDN
StringFormat class - MSDN
Font class - MSDN
FontConverter class - MSDN
FontFamily class - MSDN
SystemFonts class - MSDN
Graphics, Images, Bitmaps and Icons
Exam objective: Enhance the user interface of a .NET Framework application by using graphics, images, bitmaps, and icons
Graphics class - MSDN
BufferedGraphics class - MSDN
BufferedGraphicsManager class - MSDN
Image class - MSDN
ImageConverter class - MSDN
ImageAnimator class - MSDN
Bitmap class - MSDN
Icon class - MSDN
IconConverter class - MSDN
SystemIcons class - MSDN
Shapes and Sizes
Exam objective: Enhance the user interface of a .NET Framework application by using shapes and sizes
Point Structure - MSDN
PointConverter class - MSDN
Rectangle Structure - MSDN
RectangleConverter class - MSDN
Size Structure - MSDN
SizeConverter class - MSDN
Region class - MSDN
Text handling and regular expressions
Exam objective: Enhance the text handling capabilities of a .NET Framework application, and search, modify, and control text in a .NET Framework application by using regular expressions
(Refer System.Text namespace)
(Refer System.RegularExpressions namespace)
String class
The String class is not a specific exam objective but was added to have a place to discuss some of its caracteristics.
String class - MSDN
StringBuilder class
Regex class
Regex class - MSDN
Match class and MatchCollection class
Match class - MSDN
MatchCollection class - MSDN
Group class and GroupCollection class
Group class - MSDN
GroupCollection class - MSDN
Encode text by using Encoding classes
Encoding class - MSDN
EncodingInfo class - MSDN
ASCIIEncoding class - MSDN
UnicodeEncoding class - MSDN
UTF8Encoding class - MSDN
Encoding Fallback classes - MSDN
Decode text by using Decoding classes.
Decoder class - MSDN
Decoder Fallback classes - MSDN
Capture class and CaptureCollection class
Capture class - MSDN
CaptureCollection class - MSDN
See also
References
70-536 Training kit
.NET Framework 2.0 Application Development Foundation Self-Paced Trainig Kit Tony Northrup and Shawn Wildermuth Microsoft Press
We reference that book as the "training kit" since it is recommended by Microsoft as a training aid for the 70-536 exam (for example see MCPD
C Sharp 2005
Visual C#: THe language - 2005 Edition Donis Marchall Microsoft Press
Also recommended as a traning aid for the 70-536 exam (for example see MCPD)