.NET Development Foundation: Difference between revisions
[unreviewed revision] | [unreviewed revision] |
m restore current version |
|||
Line 1: | Line 1: | ||
<br> |
|||
{{delete|this page has been integrated in the main page og the book, an authors section has been added for a reference to M. Baker contributions, links have been moved to the main page where applicable}} |
|||
<br> |
|||
<div style="text-align:center;font: 3em sans-serif;padding;1em">Microsoft .NET Framework 2.0</div> |
|||
<div style="text-align:center;font: 3em sans-serif;padding;1em">Application Development Foundation</div> |
|||
''Original text for this page authored by [[User:Scott98390|William "Scott" Baker]]'' |
|||
==Value Type Overview== |
|||
==Preface== |
|||
There are two main Value types: ''structs'' and ''enumerations'' (or ''enum''s). Value types are stored in Stack memory. For more detailed information, refer to Microsoft's [http://msdn2.microsoft.com/en-us/library/ah19swz4.aspx struct] and [http://msdn2.microsoft.com/en-us/library/sbbt4032.aspx enum] C# 2.0 Reference pages. |
|||
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 [[Talk:Microsoft_Certified_Technology_Specialist/Exam_70-536|discussion page]]). |
|||
The preface contains information relevant to the context of the document, authors, wikibooks, etc. You can skip to the [[#Introduction|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 though 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 [[#Create_a_new_event_log|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 [[Talk:Microsoft_Certified_Technology_Specialist/Exam_70-536|discussion page]] for questions or comments. |
|||
===Exam information and certifications=== |
|||
Current information on the exam can be found at [http://www.microsoft.com/learning/exams/70-536.asp#SKILLS MSDN Exam Information] |
|||
This module is the study guide for the first exam (70-536) for obtaining many Microsoft certifications: |
|||
*[[Microsoft_Certified_Technology_Specialist#Technology_Specialist:_.NET_Framework_2.0_Web_Applications|Microsoft Certified Technology Specialist: .NET Framework 2.0 Web Applications]] |
|||
*[[Microsoft_Certified_Technology_Specialist#Technology_Specialist:_.NET_Framework_2.0_Windows_Applications|Microsoft Certified Technology Specialist: .NET Framework 2.0 Windows_Applications]] |
|||
*[[Microsoft_Certified_Technology_Specialist#.NET_Framework_2.0_Distributed_Applications|Microsoft Certified Technology Specialist: .NET Framework 2.0 Distributed Applications]] |
|||
*[[Microsoft_Certified_Professional_Developer#Web_Developer|Microsoft Certified Professionnal Developer: Web development]] |
|||
*[[Microsoft_Certified_Professional_Developer#Windows_Developer|Microsoft Certified Professionnal Developer: Windows development]] |
|||
*[[Microsoft_Certified_Professional_Developer#Enterprise_Applications_Developer|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) [https://www.microsoft.com/learning/exams/70-536.mspx 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 [[#70-536 Training kit|training kit]] does not cover every 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. |
|||
The most difficult aspect of a book like this one is to keep a balance between having enough content to cover and explain every objective of the exam and not too much content because reading and studying time should be kept to a manageable level. Furthermore, there is no reason to cover content here that is not directly related to exam objectives. |
|||
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: |
|||
* a "revision questions" section for each chapter where we could discuss the kind of questions that could be asked at the exam. |
|||
* 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=== |
|||
{{wikipedia|.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 [http://msdn2.microsoft.com/en-us/netframework/default.aspx 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 [http://blogs.msdn.com/brada/archive/2004/01/09/48925.aspx 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=== |
|||
[[Image:Overview_of_the_Common_Language_Infrastructure.png|thumb|350px|Visual overview of the Common Language Infrastructure (CLI)]] |
|||
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 what 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 system. 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 language. 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 [http://msdn2.microsoft.com/en-us/library/a4t23ktk.aspx 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, service and 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==== |
|||
{{wikipedia|data type}} |
|||
{{wikipedia|type system}} |
|||
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. |
|||
{{todo|short description of namespaces should go here}} |
|||
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 [http://msdn2.microsoft.com/en-us/library/2hf02550.aspx MSDN]. And then for an overview of the the class libraries (System types) see [http://msdn2.microsoft.com/en-us/library/hfa3fa08.aspx MSDN]. |
|||
Most of the exam is in fact based on how to use the common parts of the type librairies (System types). This is why the list of exam objectives (and this book TOC) is so long. |
|||
====Hello world==== |
|||
For the newcomers to .NET, you may want to take a little break from the concepts here and make sure that you see how the concepts discussed so far are used in a very simple example. The next concepts are not that trivial. We will put such an example [[#Hello world example|here]]. |
|||
====Value types==== |
|||
{{wikipedia|Call_stack}} |
|||
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 their 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==== |
|||
{{wikipedia|Dynamic_memory_allocation}} |
|||
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 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. |
|||
{{todo|short description of interfaces and arrays should be added here}} |
|||
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 [http://blogs.msdn.com/theoy/archive/2005/06/24/ValueRef.aspx this]. |
|||
====Collections==== |
|||
For a tutorial see [http://samples.gotdotnet.com/quickstart/howto/doc/icollection.aspx GotDotNet] |
|||
For some "prescriptive guidance" see [http://www.aspnetresources.com/blog/dotnet_collection_madness.aspx AspNetResources] |
|||
====Generics==== |
|||
====Specialized==== |
|||
====System Interfaces==== |
|||
====Events and Delegates==== |
|||
===Classes, Interfaces, and tools=== |
|||
====Hello world example==== |
|||
{{todo|this is where the basic "hello world" example will go}} |
|||
====System types==== |
|||
'''Exam objective: '''Manage data in a .NET Framework application by using the .NET Framework 2.0 system types. |
|||
(Refer System namespace) |
|||
=====Value types usage===== |
|||
Following are some "usage" oriented remarks about value types. |
|||
Value types contain the values they are assigned: |
Value types contain the values they are assigned: |
||
Line 26: | Line 319: | ||
This is different from reference types which copy a reference to the value, not the value itself. |
This is different from reference types which copy a reference to the value, not the value itself. |
||
=====Nullable type===== |
|||
[[User:Scott98390|Scott Baker]] 01:12, 27 February 2006 (UTC) |
|||
- [[Study Guides:Microsoft Certified Professional Developer (MCPD)\Exam 70-536\Nullable type|Nullable type]] |
|||
==External links== |
|||
* [http://msdn2.microsoft.com/en-us/library/s1ax56ch(vs.80).aspx MSDN2 Entry for Value Types] |
|||
[[Study Guides:Microsoft Certified Professional Developer (MCPD)\Exam 70-536\Reference types|Reference types]] |
|||
* [http://www.bozemanblog.com/CategoryView,category,Value%20Types.aspx Bill Bozeman's Blog Entry About Value Types] |
|||
* [http://blogs.msdn.com/theoy/archive/2005/06/24/ValueRef.aspx A Comparison Between Value and Reference Types] |
|||
[[Study Guides:Microsoft Certified Professional Developer (MCPD)\Exam 70-536\Attributes|Attributes]] |
|||
[[Study Guides:Microsoft Certified Professional Developer (MCPD)\Exam 70-536\Generic types|Generic types]] |
|||
Exception classes |
|||
:Some links to MSDN: |
|||
:*Exceptions and exception handling - [http://msdn2.microsoft.com/en-us/library/ms173160.aspx MSDN] |
|||
:*Handling and throwing exceptions - [http://msdn2.microsoft.com/en-us/library/5b2yeyab.aspx MSDN] |
|||
:*Exception Hierarchy - [http://msdn2.microsoft.com/en-us/library/z4c5tckx.aspx MSDN] |
|||
:*Exception Class and Properties - [http://msdn2.microsoft.com/en-us/library/5whzhsd2.aspx MSDN] |
|||
[[Study Guides:Microsoft Certified Professional Developer (MCPD)\Exam 70-536\Boxing and UnBoxing|Boxing and UnBoxing]] |
|||
TypeForwardedToAttribute Class - [http://msdn2.microsoft.com/en-us/library/system.runtime.compilerservices.typeforwardedtoattribute.aspx MSDN] |
|||
:For a discussion of TypeForwardToAttribute in the CLR see [http://msdn2.microsoft.com/en-us/library/ms404275(ide).aspx MSDN] |
|||
:Other possible links: [http://www.heege.net/blog/PermaLink,guid,8d076332-4fb0-44b5-a829-4c4d653de2d6.aspx Marcus' Blog], [http://notgartner.wordpress.com/2005/11/19/70-536-forwarding-types/ NotGartner] |
|||
====Collections==== |
|||
'''Exam objective: '''Manage a group of associated data in a .NET Framework application by using collections. |
|||
(Refer System.Collections namespace - [http://msdn2.microsoft.com/en-us/library/system.collections(vs.71).aspx MSDN]) |
|||
[[Study Guides:Microsoft Certified Professional Developer (MCPD)\Exam 70-536\ArrayList class|ArrayList class]] |
|||
Collection interfaces |
|||
:[[Study Guides:Microsoft Certified Professional Developer (MCPD)\Exam 70-536\ICollection interface and IList interface|ICollection interface and IList interface]] |
|||
:IComparer interface, IEqualityComparer interface, and IKeyComparer interface |
|||
::IComparer interface - [http://msdn2.microsoft.com/en-us/library/system.collections.icomparer.aspx MSDN] |
|||
::IEqualityComparer interface - [http://msdn2.microsoft.com/en-us/library/system.collections.iequalitycomparer.aspx MSDN] |
|||
::IKeyComparer interface - '''IKeyComparer does not exist in .Net 2.0''' |
|||
:IDictionary interface and IDictionaryEnumerator interface |
|||
::IDictionary interface - [http://msdn2.microsoft.com/en-us/library/system.collections.idictionary.aspx MSDN] |
|||
::IDictionaryEnumerator interface - [http://msdn2.microsoft.com/en-us/library/system.collections.idictionaryenumerator.aspx MSDN] |
|||
:[[Study Guides:Microsoft Certified Professional Developer (MCPD)\Exam 70-536\IEnumerable interface and IEnumerator interface|IEnumerable interface and IEnumerator interface]] |
|||
:IHashCodeProvider interface - [http://msdn2.microsoft.com/en-us/library/system.collections.ihashcodeprovider.aspx MSDN] - '''Interface is now obsolete (as of .NET 2.0)''' |
|||
[[Study Guides:Microsoft Certified Professional Developer (MCPD)\Exam 70-536\Iterators|Iterators]] |
|||
Hashtable class - [http://msdn2.microsoft.com/en-us/library/system.collections.hashtable.aspx MSDN] |
|||
:Used to represent a collection of key/value pairs. |
|||
CollectionBase class and ReadOnlyCollectionBase class |
|||
:CollectionBase class - [http://msdn2.microsoft.com/en-us/library/system.collections.collectionbase.aspx MSDN] |
|||
:ReadOnlyCollectionBase class -[http://msdn2.microsoft.com/en-us/library/system.collections.readonlycollectionbase.aspx MSDN] |
|||
DictionaryBase class and DictionaryEntry class |
|||
:DictionaryBase class - [http://msdn2.microsoft.com/en-us/library/system.collections.dictionarybase.aspx MSDN] |
|||
:DictionaryEntry '''structure''' - [http://msdn2.microsoft.com/en-us/library/system.collections.dictionaryentry.aspx MSDN] |
|||
Comparer class - [http://msdn2.microsoft.com/en-us/library/system.collections.comparer.aspx MSDN] |
|||
Queue class - [http://msdn2.microsoft.com/en-us/library/system.collections.queue.aspx MSDN] |
|||
SortedList class - [http://msdn2.microsoft.com/en-us/library/system.collections.sortedlist.aspx MSDN] |
|||
BitArray class - [http://msdn2.microsoft.com/en-us/library/system.collections.bitarray.aspx MSDN] |
|||
Stack class - [http://msdn2.microsoft.com/en-us/library/system.collections.stack.aspx 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 [http://msdn2.microsoft.com/en-us/library/system.collections.generic(vs.80).aspx MSDN ]) |
|||
Collection.Generic interfaces |
|||
:see also [http://www.ondotnet.com/pub/a/dotnet/excerpt/progcsharp4_ch09-04/index.html ONDotnet] |
|||
:Generic IComparable interface - [http://msdn2.microsoft.com/en-us/library/4d7sx9hd(VS.80).aspx MSND] |
|||
::(Refer System Namespace) |
|||
:Generic ICollection interface and Generic IList interface |
|||
::Generic ICollection interface - [http://msdn2.microsoft.com/en-us/library/92t2ye13.aspx MSDN] |
|||
::Generic IList interface - [http://msdn2.microsoft.com/en-us/library/5y536ey6.aspx MSDN] |
|||
:Generic IComparer interface and Generic IEqualityComparer interface |
|||
::Generic IComparer interface - [http://msdn2.microsoft.com/en-us/library/8ehhxeaf.aspx MSDN] |
|||
::Generic IEqualityComparer interface - [http://msdn2.microsoft.com/en-us/library/ms132151.aspx MSDN] |
|||
:Generic IDictionary interface - [http://msdn2.microsoft.com/en-us/library/s4ys34ea.aspx MSDN] |
|||
:Generic IEnumerable interface and Generic IEnumerator interface |
|||
::Generic IEnumerable interface - [http://msdn2.microsoft.com/en-us/library/9eekhta0.aspx MSDN] |
|||
::Generic IEnumerator interface - [http://msdn2.microsoft.com/en-us/library/78dfe2yb.aspx MSDN] |
|||
::IHashCodeProvider interface - [http://msdn2.microsoft.com/en-us/library/system.collections.ihashcodeprovider.aspx MSDN] - '''Interface is now obsolete (as of .NET 2.0)''' |
|||
Generic Dictionary |
|||
:Generic Dictionary class and Generic Dictionary.Enumerator structure |
|||
::Generic Dictionary class - [http://msdn2.microsoft.com/en-us/library/xfhwa508.aspx MSDN] |
|||
::Generic Dictionary.Enumerator structure - [http://msdn2.microsoft.com/en-us/library/k3z2hhax.aspx MSDN] |
|||
:Generic Dictionary.KeyCollection class and Dictionary.KeyCollection.Enumerator structure |
|||
::Generic Dictionary.KeyCollection class - [http://msdn2.microsoft.com/en-us/library/3fcwy8h6.aspx MSDN] |
|||
::Dictionary.KeyCollection.Enumerator structure - [http://msdn2.microsoft.com/en-us/library/8a7wk24w.aspx MSDN] |
|||
:Generic Dictionary.ValueCollection class and Dictionary.ValueCollection.Enumerator structure |
|||
::Generic Dictionary.ValueCollection class - [http://msdn2.microsoft.com/en-us/library/x8bctb9c.aspx MSDN]] |
|||
::Dictionary.ValueCollection.Enumerator structure - [http://msdn2.microsoft.com/en-us/library/ax9d1dzh.aspx MSDN]] |
|||
Generic Comparer class and Generic EqualityComparer class |
|||
:Generic Comparer class - [http://msdn2.microsoft.com/en-us/library/cfttsh47.aspx MSDN] |
|||
:Generic EqualityComparer class - [http://msdn2.microsoft.com/en-us/library/ms132123.aspx MSDN] |
|||
Generic KeyValuePair structure - [http://msdn2.microsoft.com/en-us/library/5tbh8a42.aspx MSDN] |
|||
Generic List class, Generic List.Enumerator structure, and Generic SortedList class |
|||
:Generic List class - [http://msdn2.microsoft.com/en-us/library/6sh2ey19.aspx MSDN] |
|||
::A generic list class instance is simply declared using the List<T> syntax where T is the specific type. |
|||
:Generic List.Enumerator structure - [http://msdn2.microsoft.com/en-us/library/x854yt9s.aspx MSDN] |
|||
:Generic SortedList class - [http://msdn2.microsoft.com/en-us/library/ms132319.aspx MSDN] |
|||
Generic Queue class and Generic Queue.Enumerator structure |
|||
:Generic Queue class - [http://msdn2.microsoft.com/en-us/library/7977ey2c(VS.80).aspx MSDN] |
|||
:Generic Queue.Enumerator structure - [http://msdn2.microsoft.com/en-us/library/1ttzy8a4(VS.80).aspx MSDN] |
|||
Generic SortedDictionary class - [http://msdn2.microsoft.com/en-us/f7fta44c.aspx MSDN] |
|||
:For differences between SortedList and SortedDictionary are explained see [http://msdn2.microsoft.com/en-us/5z658b67.aspx 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 - [http://msdn2.microsoft.com/en-us/library/he2s3bh7(VS.80).aspx MSDN] |
|||
:Generic LinkedList.Enumerator structure - [http://msdn2.microsoft.com/en-us/library/2s4xk11f.aspx MSDN] |
|||
:Generic LinkedListNode class - [http://msdn2.microsoft.com/en-us/library/ahf4c754(VS.80).aspx MSDN] |
|||
Generic Stack class and Generic Stack.Enumerator structure |
|||
:Generic Stack class - [http://msdn2.microsoft.com/en-us/library/3278tedw.aspx MSDN] |
|||
:Generic Stack.Enumerator structure - [http://msdn2.microsoft.com/en-us/library/x2bb46cs.aspx 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 - [http://msdn2.microsoft.com/en-us/library/system.collections.specialized.stringcollection.aspx MSDN] |
|||
:StringDictionary class - [http://msdn2.microsoft.com/en-us/library/system.collections.specialized.stringdictionary.aspx MSDN] |
|||
:StringEnumerator class - [http://msdn2.microsoft.com/en-us/library/system.collections.specialized.stringenumerator.aspx MSDN] |
|||
=====Specialized Dictionary classes===== |
|||
:HybridDictionary class - [http://msdn2.microsoft.com/en-us/library/system.collections.specialized.hybriddictionary.aspx MSDN] |
|||
:IOrderedDictionary interface and OrderedDictionary class |
|||
::IOrderedDictionary Interface - [http://msdn2.microsoft.com/en-us/library/system.collections.specialized.iordereddictionary.aspx MSDN] |
|||
::OrderedDictionary class - [http://msdn2.microsoft.com/en-us/library/system.collections.specialized.ordereddictionary.aspx MSDN] |
|||
:ListDictionary class - [http://msdn2.microsoft.com/en-us/library/system.collections.specialized.listdictionary.aspx MSDN] |
|||
=====Named collections===== |
|||
:NameObjectCollectionBase class - [http://msdn2.microsoft.com/en-us/library/system.collections.specialized.ordereddictionary.aspx MSDN] |
|||
:NameObjectCollectionBase.KeysCollection class - [http://msdn2.microsoft.com/en-us/library/system.collections.specialized.nameobjectcollectionbase.keyscollection.aspx MSDN] |
|||
:NameValueCollection class - [http://msdn2.microsoft.com/en-us/library/system.collections.specialized.namevaluecollection.aspx MSDN] |
|||
=====CollectionsUtil class===== |
|||
CollectionsUtil class - [http://msdn2.microsoft.com/en-us/library/system.collections.specialized.collectionsutil.aspx MSDN] |
|||
=====BitVector32 structure and BitVector32.Section structure===== |
|||
:BitVector32 structure - [http://msdn2.microsoft.com/en-us/library/system.collections.specialized.bitvector32.aspx MSDN] |
|||
:BitVector32.Section structure - [http://msdn2.microsoft.com/en-us/library/system.collections.specialized.bitvector32.section.aspx MSDN] |
|||
====Standard interfaces==== |
|||
'''Exam objective: '''Implement .NET Framework interfaces to cause components to comply with standard contracts. |
|||
(Refer System namespace) |
|||
IComparable interface - [http://msdn2.microsoft.com/en-us/library/system.icomparable(vs.71).aspx MSDN] |
|||
:The IComparable interface defines a comparison method that a value type or class implements to create a type-specific comparison method |
|||
IDisposable interface - [http://msdn2.microsoft.com/en-us/library/system.idisposable.aspx 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 - [http://msdn2.microsoft.com/en-us/library/system.iconvertible.aspx MSDN] |
|||
ICloneable interface - [http://msdn2.microsoft.com/en-us/library/system.icloneable.aspx MSDN] |
|||
INullableValue interface - [http://msdn2.microsoft.com/de-de/library/system.inullablevalue.aspx MSDN] |
|||
IEquatable interface - [http://msdn2.microsoft.com/en-us/library/ms131187.aspx MSDN] |
|||
IFormattable interface - [http://msdn2.microsoft.com/en-us/library/system.iformattable.aspx MSDN] |
|||
====Events and delegates==== |
|||
'''Exam objectives: '''Control interactions between .NET Framework application components by using events and delegates. |
|||
(Refer System namespace) |
|||
[[Study Guides:Microsoft Certified Professional Developer (MCPD)\Exam 70-536\Delegate class|Delegate class]] |
|||
EventArgs class - [http://msdn2.microsoft.com/en-us/library/system.eventargs.aspx MSDN] |
|||
EventHandler delegates - [http://msdn2.microsoft.com/en-us/library/system.eventhandler(VS.80).aspx 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) |
|||
[[Study Guides:Microsoft Certified Professional Developer (MCPD)\Exam 70-536\Inherit from ServiceBase class|Inherit from ServiceBase class]] |
|||
ServiceController class and ServiceControllerPermission class |
|||
:ServiceController class - [http://msdn2.microsoft.com/en-us/library/system.serviceprocess.servicecontroller(VS.80).aspx MSDN] |
|||
:ServiceControllerPermission class - [http://msdn2.microsoft.com/en-us/library/system.serviceprocess.servicecontrollerpermission(VS.80).aspx MSDN] |
|||
ServiceInstaller and ServiceProcessInstaller class |
|||
:ServiceInstaller - [http://msdn2.microsoft.com/en-us/library/system.serviceprocess.serviceinstaller.aspx MSDN] |
|||
:ServiceProcessInstaller class - [http://msdn2.microsoft.com/en-us/library/system.serviceprocess.serviceprocessinstaller.aspx MSDN] |
|||
ServiceChangeDescription structure and ServiceChangeReason enumeration |
|||
:SessionChangeDescription structure - [http://msdn2.microsoft.com/en-us/library/system.serviceprocess.sessionchangedescription.aspx MSDN] |
|||
:SessionChangeReason enumeration - [http://msdn2.microsoft.com/en-us/library/system.serviceprocess.sessionchangereason.aspx MSDN] |
|||
====Develop multithreaded applications==== |
|||
'''Exam objective: '''Develop multithreaded .NET Framework applications |
|||
(Refer System.Threading namespace) |
|||
Thread class - [http://msdn2.microsoft.com/en-us/library/system.threading.thread(VS.80).aspx MSDN] |
|||
ThreadPool class - [http://msdn2.microsoft.com/en-us/library/system.threading.threadpool(VS.80).aspx MSDN] |
|||
[[Study Guides:Microsoft Certified Professional Developer (MCPD)\Exam 70-536\ThreadStart delegate, ParameterizedThreadStart delegate, and SynchronizationContext class|ThreadStart delegate, ParameterizedThreadStart delegate, and SynchronizationContext class]] |
|||
Timeout class, Timer class, TimerCallback delegate, WaitCallback delegate, WaitHandle class, and WaitOrTimerCallback delegate |
|||
:Timeout class - [http://msdn2.microsoft.com/en-us/library/system.threading.timeout.aspx MSDN] |
|||
:Timer class - [http://msdn2.microsoft.com/en-us/library/system.timers.timer(VS.71).aspx MSDN] |
|||
:TimerCallback delegate - [http://msdn2.microsoft.com/en-us/library/system.threading.timercallback.aspx MSDN] |
|||
:WaitCallback delegate - [http://msdn2.microsoft.com/en-us/library/system.threading.waitcallback.aspx MSDN] |
|||
:WaitHandle class - [http://msdn2.microsoft.com/en-us/library/system.threading.waithandle.aspx MSDN] |
|||
:WaitOrTimerCallback delegate - [http://msdn2.microsoft.com/en-us/library/system.threading.waitortimercallback.aspx MSDN] |
|||
ThreadExceptionEventArgs class and ThreadExceptionEventHanlder class |
|||
:ThreadExceptionEventArgs class - [http://msdn2.microsoft.com/en-us/library/system.threading.threadexceptioneventargs.aspx MSDN] |
|||
:ThreadExceptionEventHandler class - [http://msdn2.microsoft.com/en-us/library/system.threading.threadexceptioneventhandler(vs.80).aspx MSDN] |
|||
ThreadState enumeration and ThreadPriority enumeration |
|||
:ThreadState enumeration - [http://msdn2.microsoft.com/en-us/library/system.threading.threadstate.aspx MSDN] |
|||
:ThreadPriority enumeration - [http://msdn2.microsoft.com/en-us/library/system.threading.threadpriority.aspx MSDN] |
|||
ReaderWriterLock class - [http://msdn2.microsoft.com/en-us/library/system.threading.readerwriterlock.aspx MSDN] |
|||
AutoResetEvent class and ManualResetEvent class |
|||
:AutoResetEvent class - [http://msdn2.microsoft.com/en-us/library/system.threading.autoresetevent.aspx MSDN] |
|||
:ManualResetEvent class - [http://msdn2.microsoft.com/en-us/library/system.threading.manualresetevent.aspx MSDN] |
|||
IAsyncResult interface and ICancelableAsyncResult interface |
|||
:(Refer System namespace) |
|||
:IAsyncResult interface - [http://msdn2.microsoft.com/en-us/library/system.iasyncresult.aspx MSDN] |
|||
:ICancelableAsyncResult interface - [http://msdn2.microsoft.com/en-us/library/microsoft.teamfoundation.client.icancelableasyncresult(vs.80).aspx MSDN] |
|||
EventWaitHandle class, RegisterWaitHandle class, SendOrPostCallback delegate, and IOCompletionCallback delegate |
|||
:EventWaitHandle class - [http://msdn2.microsoft.com/en-us/library/system.threading.eventwaithandle.aspx MSDN] |
|||
:RegisterWaitHandle class - [http://msdn2.microsoft.com/en-us/library/system.threading.threadpool.registerwaitforsingleobject.aspx MSDN] |
|||
::This is a typo in the exam list of objectives and the training kit. The term '''RegisterWaitForSingleObject''' should be saerch instead (see [http://support.microsoft.com/kb/923018/en-us KB]) |
|||
:SendOrPostCallback delegate - [http://msdn2.microsoft.com/en-us/library/system.threading.sendorpostcallback.aspx MSDN] |
|||
:IOCompletionCallback delegate - [http://msdn2.microsoft.com/en-us/library/system.threading.iocompletioncallback.aspx MSDN] |
|||
Interlocked class, NativeOverlapped structure, and Overlapped class |
|||
:Interlocked class - [http://msdn2.microsoft.com/en-us/library/system.threading.interlocked(VS.80).aspx MSDN] |
|||
:NativeOverlapped structure - [http://msdn2.microsoft.com/en-us/library/system.threading.nativeoverlapped.aspx MSDN] |
|||
:Overlapped class - [http://msdn2.microsoft.com/en-us/library/system.threading.overlapped.aspx MSDN] |
|||
ExecutionContext class, HostExecutionContext class, HostExecutionContext manager, and ContextCallback delegate |
|||
:ExecutionContext class - [http://msdn2.microsoft.com/en-us/library/system.threading.executioncontext.aspx MSDN] |
|||
:HostExecutionContext class - [http://msdn2.microsoft.com/en-us/library/system.threading.hostexecutioncontext.aspx MSDN] |
|||
:HostExecutionContext manager - [http://msdn2.microsoft.com/en-us/library/system.threading.hostexecutioncontextmanager.aspx MSDN] |
|||
::In fact was is refered to here is the HostExecutionContextManager class |
|||
:ContextCallback delegate - [http://msdn2.microsoft.com/en-us/library/system.threading.contextcallback.aspx MSDN] |
|||
LockCookie structure, Monitor class, Mutex class, and Semaphore class MSDN] |
|||
:LockCookie structure - [http://msdn2.microsoft.com/en-us/library/system.threading.lockcookie.aspx MSDN] |
|||
:Monitor class - [http://msdn2.microsoft.com/en-us/library/system.threading.monitor.aspx MSDN] |
|||
:Mutex class - [http://msdn2.microsoft.com/en-us/library/system.threading.mutex.aspx MSDN] |
|||
:Semaphore class - [http://msdn2.microsoft.com/en-us/library/system.threading.semaphore.aspx 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 - [http://msdn2.microsoft.com/en-us/library/6s0z09xw.aspx 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 - [http://msdn2.microsoft.com/en-us/library/c5b8a8f9.aspx MSDN] |
|||
Configure an application domain - [http://msdn2.microsoft.com/en-us/library/c8hk0245.aspx MSDN] |
|||
Retrieve setup information from an application domain - [http://msdn2.microsoft.com/en-us/library/dxh1dy9h.aspx MSDN] |
|||
Load assemblies into an application domain - [http://msdn2.microsoft.com/en-us/library/25y1ya39.aspx 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 [http://msdn2.microsoft.com/en-us/library/e6t4tk09.aspx MSDN] |
|||
For specifics on the EventLog class and some cautions about its use see [http://msdn2.microsoft.com/en-us/library/system.diagnostics.eventlog.aspx 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 - [http://msdn2.microsoft.com/en-us/library/system.configuration.configuration.aspx MSDN] |
|||
:ConfigurationManager class - [http://msdn2.microsoft.com/en-us/library/system.configuration.configurationmanager.aspx MSDN] |
|||
ConfigurationSettings class, ConfigurationElement class, ConfigurationElementCollection class, and ConfigurationElementProperty class |
|||
:ConfigurationSettings class - [http://msdn2.microsoft.com/en-us/library/system.configuration.configurationsettings(vs.71).aspx MSDN] |
|||
:ConfigurationElement class - [http://msdn2.microsoft.com/en-us/library/system.configuration.configurationelement.aspx MSDN] |
|||
:ConfigurationElementCollection class - [http://msdn2.microsoft.com/en-us/library/system.configuration.configurationelementcollection.aspx MSDN] |
|||
:ConfigurationElementProperty class - [http://msdn2.microsoft.com/en-us/library/system.configuration.configurationelementproperty(VS.80).aspx MSDN] |
|||
Implement IConfigurationSectionHandler interface - [http://msdn2.microsoft.com/en-us/library/system.configuration.iconfigurationsectionhandler.aspx MSDN] |
|||
ConfigurationSection class, ConfigurationSectionCollection class, ConfigurationSectionGroup class, and ConfigurationSectionGroupCollection class |
|||
:ConfigurationSection class - [http://msdn2.microsoft.com/en-us/library/system.configuration.configurationsection(VS.80).aspx MSDN] |
|||
:ConfigurationSectionCollection class - [http://msdn2.microsoft.com/en-us/library/system.configuration.configurationsectioncollection.aspx MSDN] |
|||
:ConfigurationSectionGroup class - [http://msdn2.microsoft.com/en-us/library/system.configuration.configurationsectiongroup.aspx MSDN] |
|||
:ConfigurationSectionGroupCollection - [http://msdn2.microsoft.com/en-us/library/system.configuration.configurationsectiongroupcollection.aspx MSDN] |
|||
Implement ISettingsProviderService interface - [http://msdn2.microsoft.com/en-us/library/system.configuration.isettingsproviderservice.aspx MSDN] |
|||
Implement IApplicationSettingsProvider interface - [http://msdn2.microsoft.com/en-us/library/system.configuration.iapplicationsettingsprovider.aspx MSDN] |
|||
ConfigurationValidationBase class |
|||
:No direct result on MSDN - to be checked |
|||
Implement IConfigurationSystem interface - [http://msdn2.microsoft.com/en-us/library/system.configuration.iconfigurationsystem.aspx 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 [http://msdn2.microsoft.com/en-us/library/kza1yk3a(VS.80).aspx MSDN] and the corresponding How-To section. |
|||
Installer class - [http://msdn2.microsoft.com/en-us/library/system.configuration.install.installer.aspx MSDN] |
|||
Configure which runtime version a .NET Framework application should use - [http://msdn2.microsoft.com/en-us/library/f4kkd0k5(VS.80).aspx MSDN] |
|||
Configure where the runtime should search for an assembly - [http://msdn2.microsoft.com/en-us/library/yx7xezcf.aspx MSDN] |
|||
Configure the location of an assembly and which version of the assembly to use - [http://msdn2.microsoft.com/en-us/library/4191fzwb(VS.80).aspx MSDN] and [http://msdn2.microsoft.com/en-us/library/7wd6ex19.aspx MSDN] |
|||
Direct the runtime to use the DEVPATH environment variable when searching for assemblies - [http://msdn2.microsoft.com/en-us/library/cskzh7h6(VS.80).aspx MSDN] |
|||
AssemblyInstaller class - [http://msdn2.microsoft.com/en-us/library/system.configuration.install.assemblyinstaller.aspx MSDN] |
|||
ComponentInstaller class - [http://msdn2.microsoft.com/en-us/library/system.configuration.install.componentinstaller.aspx MSDN] |
|||
Configure a .NET Framework application by using the .NET Framework Configuration tool (Mscorcfg.msc) - [http://msdn2.microsoft.com/en-us/library/2bc0cxhc.aspx MSND] |
|||
ManagedInstaller class - [http://msdn2.microsoft.com/en-us/library/system.configuration.install.managedinstallerclass(VS.80).aspx MSDN] |
|||
InstallContext class - [http://msdn2.microsoft.com/en-us/library/system.configuration.install.installcontext.aspx MSDN] |
|||
InstallerCollection class - [http://msdn2.microsoft.com/en-us/library/system.configuration.install.installercollection.aspx MSDN] |
|||
Implement IManagedInstaller interface - [http://msdn2.microsoft.com/en-us/library/system.configuration.install.imanagedinstaller.aspx MSDN] |
|||
InstallEventHandler delegate - [http://msdn2.microsoft.com/en-us/library/system.configuration.install.installeventhandler.aspx MSDN] |
|||
Configure concurrent garbage collection - [http://msdn2.microsoft.com/en-us/library/at1stbec(VS.80).aspx MSDN] |
|||
Register remote objects by using configuration files - [http://msdn2.microsoft.com/en-us/library/ms223161(vs.80).aspx MSDN] |
|||
====Manage an event log==== |
|||
'''Exam objective: '''Manage an event log by using the System.Diagnostics namespace |
|||
EventLog class - [http://msdn2.microsoft.com/en-us/library/system.diagnostics.eventlog.aspx MSDN] |
|||
EventSourceCreationData class - [http://msdn2.microsoft.com/en-us/library/system.diagnostics.eventsourcecreationdata.aspx 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. |
|||
{{dynamic navigation |
|||
|title=[[C# Code sample]] |
|||
|body= |
|||
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 [http://msdn2.microsoft.com/en-us/library/system.diagnostics.eventloginstaller.aspx 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 - [http://msdn2.microsoft.com/en-us/library/system.diagnostics.process.aspx MSDN] |
|||
:For example code for GetCurrentProcess(), GetProcessesByName(), GetProcesses(), and GetProcessById() see [http://msdn2.microsoft.com/en-us/library/system.diagnostics.process.getcurrentprocess.aspx MSDN] |
|||
Retrieve information about the current process - [http://msdn2.microsoft.com/en-us/library/system.diagnostics.process.getcurrentprocess.aspx 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 [http://msdn2.microsoft.com/en-us/library/system.diagnostics.process.modules.aspx MSDN] |
|||
:For the ProcessModule class see [http://msdn2.microsoft.com/en-us/library/system.diagnostics.processmodule.aspx MSDN] |
|||
PerformanceCounter class, PerformanceCounterCategory, and CounterCreationData class |
|||
:PerformanceCounter class - [http://msdn2.microsoft.com/en-us/library/system.diagnostics.performancecounter.aspx MSDN] |
|||
:PerformanceCounterCategory - [http://msdn2.microsoft.com/en-us/library/system.diagnostics.performancecountercategory.aspx MSDN] |
|||
:CounterCreationData class - [http://msdn2.microsoft.com/en-us/library/system.diagnostics.countercreationdata.aspx MSDN] |
|||
[[Study Guides:Microsoft Certified Professional Developer (MCPD)\Exam 70-536\Start a process both by using and by not using command-line arguments.|Start a process both by using and by not using command-line arguments.]] |
|||
StackTrace class - [http://msdn2.microsoft.com/en-us/library/system.diagnostics.stacktrace.aspx MSDN] |
|||
StackFrame class - [http://msdn2.microsoft.com/en-us/library/system.diagnostics.stackframe.aspx MSDN] |
|||
====Debug and Trace==== |
|||
'''Exam objective: '''Debug and trace a .NET Framework application by using the System.Diagnostics namespace. |
|||
[[Study Guides:Microsoft Certified Professional Developer (MCPD)\Exam 70-536\Debug class and Debugger class|Debug class and Debugger class]] |
|||
Trace class - [http://msdn2.microsoft.com/en-us/library/system.diagnostics.trace.aspx MSDN] |
|||
CorrelationManager class - [http://msdn2.microsoft.com/en-us/library/system.diagnostics.correlationmanager.aspx MSDN] |
|||
TraceListener class - [http://msdn2.microsoft.com/en-us/library/system.diagnostics.tracelistener.aspx MSDN] |
|||
TraceSource class - [http://msdn2.microsoft.com/en-us/library/system.diagnostics.tracesource.aspx MSDN] |
|||
TraceSwitch class - [http://msdn2.microsoft.com/en-us/library/system.diagnostics.traceswitch.aspx MSDN] |
|||
XmlWriterTraceListener class - [http://msdn2.microsoft.com/en-us/library/system.diagnostics.xmlwritertracelistener(VS.80).aspx MSDN] |
|||
DelimitedListTraceListener class - [http://msdn2.microsoft.com/en-us/library/system.diagnostics.delimitedlisttracelistener.aspx MSDN] |
|||
EventlogTraceListener class - [http://msdn2.microsoft.com/en-us/library/system.diagnostics.eventlogtracelistener.aspx MSDN] |
|||
Debugger attributes - [http://msdn.microsoft.com/msdnmag/issues/04/05/VisualStudio2005Debugging/default.aspx MSDN] |
|||
:DebuggerBrowsableAttribute class - [http://msdn2.microsoft.com/en-us/library/system.diagnostics.debuggerbrowsableattribute.aspx MSDN] |
|||
:DebuggerDisplayAttribute class - [http://msdn2.microsoft.com/en-us/library/system.diagnostics.debuggerdisplayattribute.aspx MSDN] |
|||
:DebuggerHiddenAttribute class - [http://msdn2.microsoft.com/en-us/library/system.diagnostics.debuggerhiddenattribute.aspx MSDN] |
|||
:DebuggerNonUserCodeAttribute class - [http://msdn2.microsoft.com/en-us/library/system.diagnostics.debuggernonusercodeattribute.aspx MSDN] |
|||
:DebuggerStepperBoundaryAttribute class - [http://msdn2.microsoft.com/en-us/library/system.diagnostics.debuggerstepperboundaryattribute.aspx MSDN] |
|||
:DebuggerStepThroughAttribute class - [http://msdn2.microsoft.com/en-us/library/system.diagnostics.debuggerstepthroughattribute.aspx MSDN] |
|||
:DebuggerTypeProxyAttribute class - [http://msdn2.microsoft.com/en-us/library/system.diagnostics.debuggertypeproxyattribute.aspx MSDN] |
|||
:DebuggerVisualizerAttribute class - [http://msdn2.microsoft.com/en-us/library/system.diagnostics.debuggervisualizerattribute.aspx MSDN] |
|||
====Embed management information==== |
|||
'''Exam objective: '''Embed management information and events into a .NET Framework application. |
|||
(Refer System.Management namespace - [http://msdn2.microsoft.com/en-us/library/system.management(VS.71).aspx MSDN]) |
|||
[[Study Guides:Microsoft Certified Professional Developer (MCPD)\Exam 70-536\Retrieve a collection of Management objects by using the ManagementObjectSearcher class and its derived classes.|Retrieve a collection of Management objects by using the ManagementObjectSearcher class and its derived classes.]] |
|||
:ManagementObjectSearcher class - [http://msdn2.microsoft.com/en-us/library/system.management.managementobjectsearcher(VS.80).aspx MSDN] |
|||
:[[Study Guides:Microsoft Certified Professional Developer (MCPD)\Exam 70-536\Enumerate all disk drivers, network adapters, and processes on a computer.|Enumerate all disk drivers, network adapters, and processes on a computer.]] |
|||
:Retrieve information about all network connections |
|||
::Example to be provided |
|||
:[[Study Guides:Microsoft Certified Professional Developer (MCPD)\Exam 70-536\Retrieve information about all services that are paused.|Retrieve information about all services that are paused.]] |
|||
ManagementQuery class - [http://msdn2.microsoft.com/en-us/library/system.management.managementquery.aspx MSDN] |
|||
EventQuery class - [http://msdn2.microsoft.com/en-us/library/system.management.eventquery.aspx MSDN] |
|||
:ObjectQuery class - [http://msdn2.microsoft.com/en-us/library/system.management.objectquery.aspx MSDN] |
|||
Subscribe to management events by using the ManagementEventWatcher class - [http://msdn2.microsoft.com/en-us/library/system.management.managementeventwatcher.aspx MSDN] |
|||
==Serialization and Input/Output== |
|||
'''Exam objective: '''Implementing serialization and input/output functionality in a .NET Framework application |
|||
===Topics=== |
|||
====Serialization==== |
|||
{{wikipedia|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 [[Study Guides:Microsoft Certified Professional Developer (MCPD)\Exam 70-536\BinaryFormatter class (Refer System.Runtime.Serialization.Formatters.Binary namespace)|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 [[Study Guides:Microsoft Certified Professional Developer (MCPD)\Exam 70-536\XmlSerializer class (Refer System.Xml.Serialization)|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 [http://msdn2.microsoft.com/en-us/library/90c86ass.aspx 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 [http://msdn2.microsoft.com/en-us/library/8dzkff1s.aspx 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 - [http://msdn2.microsoft.com/en-us/library/system.runtime.serialization.ideserializationcallback.aspx MSDN] |
|||
IFormatter interface and IFormatterConverter interface |
|||
:IFormatter interface - [http://msdn2.microsoft.com/en-au/library/system.runtime.serialization.iformatter.aspx MSDN] |
|||
:IFormatterConverter interface - [http://msdn2.microsoft.com/en-au/library/system.runtime.serialization.iformatterconverter.aspx MSDN] |
|||
ISerializable interface - [http://msdn2.microsoft.com/en-au/library/system.runtime.serialization.iserializable.aspx MSDN] |
|||
=====Serilization attributes===== |
|||
:For some serialization attributes exemple see [http://msdn.microsoft.com/msdnmag/issues/04/10/AdvancedSerialization MSDN] |
|||
OnDeserializedAttribute class and OnDeserializingAttribute class |
|||
:OnDeserializedAttribute class - [http://msdn2.microsoft.com/en-us/library/system.runtime.serialization.ondeserializedattribute.aspx MSDN] |
|||
:OnDeserializingAttribute class - [http://msdn2.microsoft.com/en-us/library/system.runtime.serialization.ondeserializingattribute.aspx MSDN] |
|||
OnSerializedAttribute class and OnSerializingAttribute class |
|||
:OnSerializedAttribute class - [http://msdn2.microsoft.com/en-us/library/system.runtime.serialization.onserializedattribute.aspx MSDN] |
|||
:OnSerializingAttribute class - [http://msdn2.microsoft.com/en-us/library/system.runtime.serialization.onserializingattribute.aspx MSDN] |
|||
OptionalFieldAttribute class - [http://msdn2.microsoft.com/en-us/library/system.runtime.serialization.optionalfieldattribute.aspx MSDN] |
|||
=====SerializationEntry structure and SerializationInfo class===== |
|||
SerializationEntry structure - [http://msdn2.microsoft.com/en-us/library/system.runtime.serialization.serializationentry.aspx MSDN] |
|||
SerializationInfo class - [http://msdn2.microsoft.com/en-us/library/system.runtime.serialization.serializationinfo.aspx MSDN] |
|||
=====ObjectManager class===== |
|||
ObjectManager class - [http://msdn2.microsoft.com/en-us/library/system.runtime.serialization.objectmanager.aspx MSDN] |
|||
=====Formatter class, FormatterConverter class, and FormatterServices class===== |
|||
Formatter class - [http://msdn2.microsoft.com/en-us/library/system.runtime.serialization.formatter.aspx MSDN] |
|||
FormatterConverter class - [http://msdn2.microsoft.com/en-us/library/system.runtime.serialization.formatterconverter.aspx MSDN] |
|||
FormatterServices class - [http://msdn2.microsoft.com/en-us/library/system.runtime.serialization.formatterservices.aspx MSDN] |
|||
=====StreamingContext structure===== |
|||
StreamingContext structure - [http://msdn2.microsoft.com/en-us/library/system.runtime.serialization.streamingcontext.aspx MSDN] |
|||
====XML Serialization==== |
|||
'''Exam objective: '''Control the serialization of an object into XML format by using the System.Xml.Serialization namespace. |
|||
XmlSerializer class - [http://msdn2.microsoft.com/en-us/library/system.xml.serialization.xmlserializer.aspx MSDN] |
|||
:Exam objective: Serialize and deserialize objects into XML format by using the XmlSerializer class |
|||
Control serialization by using serialization attributes - [http://msdn2.microsoft.com/en-us/library/2baksw0z.aspx MSDN] |
|||
:For a list of attributes for controlling serialization see [http://msdn2.microsoft.com/en-us/library/83y7df3e.aspx MSDN] |
|||
Implement XML Serialization interfaces to provide custom formatting for XML serialization - [http://msdn2.microsoft.com/en-us/library/system.xml.serialization.ixmlserializable.aspx MSDN] |
|||
Delegates and event handlers are provided by the System.Xml.Serialization namespace - [http://msdn2.microsoft.com/en-us/library/system.xml.serialization(VS.71).aspx MSDN] |
|||
====Custom serialization==== |
|||
'''Exam objective: '''Implement custom serialization formatting by using the Serialization Formatter classes. |
|||
SoapFormatter clas - [http://msdn2.microsoft.com/en-us/library/system.runtime.serialization.formatters.soap.soapformatter.aspx MSDN] |
|||
:(Refer System.Runtime.Serialization.Formatters.Soap namespace) |
|||
BinaryFormatter class - [http://msdn2.microsoft.com/en-us/library/system.runtime.serialization.formatters.binary.binaryformatter.aspx 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 [http://msdn2.microsoft.com/en-us/library/ms404278.aspx MSDN] |
|||
:File class - [http://msdn2.microsoft.com/en-us/library/system.io.file.aspx MSDN] |
|||
:FileInfo class - [http://msdn2.microsoft.com/en-us/library/system.io.fileinfo.aspx MSDN] |
|||
Directory class and DirectoryInfo class |
|||
:Directory class - [http://msdn2.microsoft.com/en-us/library/system.io.directory.aspx MSDN] |
|||
:DirectoryInfo class - [http://msdn2.microsoft.com/en-us/library/system.io.directoryinfo.aspx MSDN] |
|||
DriveInfo class and DriveType enumeration |
|||
:DriveInfo class - [http://msdn2.microsoft.com/en-us/library/system.io.driveinfo.aspx MSDN] |
|||
:DriveType enumeration - [http://msdn2.microsoft.com/en-us/library/system.io.drivetype.aspx MSDN] |
|||
[[Study Guides:Microsoft Certified Professional Developer (MCPD)\Exam 70-536\FileSystemInfo class and FileSystemWatcher class|FileSystemInfo class and FileSystemWatcher class]] |
|||
[[Study Guides:Microsoft Certified Professional Developer (MCPD)\Exam 70-536\Path class|Path class]] |
|||
ErrorEventArgs class and ErrorEventHandler delegate |
|||
:ErrorEventArgs class - [http://msdn2.microsoft.com/en-us/library/system.io.erroreventargs.aspx MSDN] |
|||
:ErrorEventHandler delegate - [http://msdn2.microsoft.com/en-us/library/system.io.erroreventhandler.aspx MSDN] |
|||
RenamedEventArgs class and RenamedEventHandler delegate |
|||
:RenamedEventArgs class - [http://msdn2.microsoft.com/en-us/library/system.io.renamedeventargs.aspx MSDN] |
|||
:RenamedEventHandler delegate - [http://msdn2.microsoft.com/en-us/library/system.io.renamedeventhandler.aspx MSDN] |
|||
====Byte streams==== |
|||
'''Exam objective: '''Manage byte streams by using Stream classes. |
|||
(Refer System.IO namespace) |
|||
FileStream class - [http://msdn2.microsoft.com/en-us/library/system.io.filestream.aspx MSDN] |
|||
Stream class - [http://msdn2.microsoft.com/en-us/library/system.io.stream.aspx 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 [http://msdn2.microsoft.com/en-us/library/zs551520.aspx MSDN]. |
|||
:For a discussion on File and Stream IO see [http://msdn2.microsoft.com/en-us/library/system.io.stream.aspx MSDN]. |
|||
MemoryStream class - [http://msdn2.microsoft.com/en-us/library/system.io.memorystream.aspx MSDN] |
|||
BufferedStream class - [http://msdn2.microsoft.com/en-us/library/system.io.bufferedstream.aspx MSDN] |
|||
====Reader and Writer classes==== |
|||
'''Exam objective: '''Manage the .NET Framework application data by using Reader and Writer classes. |
|||
(Refer System.IO namespace) |
|||
[[Study Guides:Microsoft Certified Professional Developer (MCPD)\Exam 70-536\StringReader class and StringWriter class|StringReader class and StringWriter class]] |
|||
[[Study Guides:Microsoft Certified Professional Developer (MCPD)\Exam 70-536\TextReader class and TextWriter class|TextReader class and TextWriter class]] |
|||
[[Study Guides:Microsoft Certified Professional Developer (MCPD)\Exam 70-536\StreamReader class and StreamWriter class|StreamReader class and StreamWriter class]] |
|||
BinaryReader class and BinaryWriter class |
|||
:BinaryReader class - [http://msdn2.microsoft.com/en-us/library/system.io.binaryreader.aspx MSDN] |
|||
:BinaryWriter class - [http://msdn2.microsoft.com/en-us/library/system.io.binarywriter.aspx 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 - [http://msdn2.microsoft.com/en-us/library/system.io.isolatedstorage.isolatedstoragefile.aspx MSDN] |
|||
IsolatedStorageFileStream class - [http://msdn2.microsoft.com/en-us/library/system.io.isolatedstorage.isolatedstoragefilestream.aspx MSDN] |
|||
DeflateStream class - [http://msdn2.microsoft.com/en-us/library/system.io.compression.deflatestream.aspx MSDN] |
|||
GZipStream class - [http://msdn2.microsoft.com/en-us/library/system.io.compression.gzipstream.aspx 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==== |
|||
{{wikipedia|Code_access_security}} |
|||
Code access security, CAS, allows the control of various permissions granted to specific managed applications. [http://msdn2.microsoft.com/en-us/library/930b76w0(VS.80).aspx 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 - [http://msdn2.microsoft.com/en-us/library/system.security.securitymanager.aspx MSDN] |
|||
CodeAccessPermission class - [http://msdn2.microsoft.com/en-us/library/system.security.codeaccesspermission.aspx 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) - [http://msdn2.microsoft.com/en-us/library/aa735610(VS.71).aspx MSDN] |
|||
PermissionSet class, NamedPermissionSet class, and PermissionSetCollection class |
|||
:PermissionSet class - [http://msdn2.microsoft.com/en-us/library/system.security.permissionset.aspx MSDN] |
|||
:NamedPermissionSet class - [http://msdn2.microsoft.com/en-us/library/system.security.namedpermissionset.aspx MSDN] |
|||
:PermissionSetCollection class |
|||
::There does not seem to be such a thing, to be investigated... |
|||
Standard Security interfaces |
|||
:IEvidenceFactory interface - [http://msdn2.microsoft.com/en-us/library/system.security.ievidencefactory.aspx MSDN] |
|||
:IPermission interface - [http://msdn2.microsoft.com/en-us/library/system.security.ipermission.aspx 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 - [http://msdn2.microsoft.com/en-us/library/system.security.accesscontrol.directorysecurity.aspx MSDN] |
|||
:FileSecurity class - [http://msdn2.microsoft.com/en-us/library/system.security.accesscontrol.filesecurity.aspx MSDN] |
|||
:FileSystemSecurity class - [http://msdn2.microsoft.com/en-us/library/system.security.accesscontrol.filesystemsecurity.aspx MSDN] |
|||
:RegistrySecurity class - [http://msdn2.microsoft.com/en-us/library/system.security.accesscontrol.registrysecurity.aspx MSDN] |
|||
AccessRule class - [http://msdn2.microsoft.com/en-us/library/system.security.accesscontrol.accessrule.aspx MSDN] |
|||
AuthorizationRule class and AuthorizationRuleCollection class |
|||
:AuthorizationRule class - [http://msdn2.microsoft.com/en-us/library/system.web.configuration.authorizationrule.aspx MSDN] |
|||
:AuthorizationRuleCollection class - [http://msdn2.microsoft.com/en-us/library/system.security.accesscontrol.authorizationrulecollection.aspx MSDN] |
|||
CommonAce class, CommonAcl class, CompoundAce class, GeneralAce class, and GeneralAcl class |
|||
:CommonAce class - [http://msdn2.microsoft.com/en-us/library/system.security.accesscontrol.commonace.aspx MSDN] |
|||
:CommonAcl class - [http://msdn2.microsoft.com/en-us/library/system.security.accesscontrol.commonacl.aspx MSDN] |
|||
:CompoundAce class - [http://msdn2.microsoft.com/en-us/library/system.security.accesscontrol.compoundace.aspx MSDN] |
|||
:GeneralAce class |
|||
::Does not seem to be a class like that, to be investigated... |
|||
:GeneralAcl class |
|||
::Neither this one??? |
|||
AuditRule class - [http://msdn2.microsoft.com/en-us/library/system.security.accesscontrol.auditrule.aspx MSDN] |
|||
MutexSecurity class, ObjectSecurity class, and SemaphoreSecurity class |
|||
:MutexSecurity class - [http://msdn2.microsoft.com/en-us/library/system.security.accesscontrol.mutexsecurity.aspx MSDN] |
|||
:ObjectSecurity class - [http://msdn2.microsoft.com/en-us/library/system.security.accesscontrol.objectsecurity.aspx MSDN] |
|||
:SemaphoreSecurity class - [http://msdn2.microsoft.com/en-us/library/system.security.accesscontrol.semaphoresecurity.aspx MSDN] |
|||
====Implement custom authentication scheme==== |
|||
'''Exam objective: '''Implement a custom authentication scheme by using the System.Security.Authentication classes. |
|||
(Refer System.Security.Authentication namespace - [http://msdn2.microsoft.com/en-us/library/system.security.authentication.aspx MSDN]) |
|||
For a refernece on custom authentification schemes see [http://msdn2.microsoft.com/en-us/library/907hb5w9(vs.71).aspx 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 - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.des.aspx MSDN] |
|||
:DESCryptoServiceProvider class - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.descryptoserviceprovider.aspx MSDN] |
|||
HashAlgorithm class - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.hashalgorithm.aspx MSDN] |
|||
DSA class and DSACryptoServiceProvider class |
|||
:DSA class - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.dsa.aspx MSDN] |
|||
:DSACryptoServiceProvider class - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.dsacryptoserviceprovider.aspx MSDN] |
|||
SHA1 class and SHA1CryptoServiceProvider class |
|||
:SHA1 class - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.sha1.aspx MSDN] |
|||
:SHA1CryptoServiceProvider class - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.sha1cryptoserviceprovider.aspx MSDN] |
|||
TripleDES and TripleDESCryptoServiceProvider class |
|||
:TripleDES - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.tripledes(VS.80).aspx MSDN] |
|||
:TripleDESCryptoServiceProvider class - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.tripledescryptoserviceprovider.aspx MSDN] |
|||
MD5 class and MD5CryptoServiceProvider class |
|||
:MD5 class - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.md5.aspx MSDN] |
|||
:MD5CryptoServiceProvider class - [http://msdn2.microsoft.com/en-gb/library/system.security.cryptography.md5cryptoserviceprovider(VS.80).aspx MSDN] |
|||
RSA class and RSACryptoServiceProvider class |
|||
:RSA class - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.rsa.aspx MSDN] |
|||
:RSACryptoServiceProvider class - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.rsacryptoserviceprovider.aspx MSDN] |
|||
RandomNumberGenerator class - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.randomnumbergenerator.aspx MSDN] |
|||
CryptoStream class - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.cryptostream(VS.80).aspx MSDN] |
|||
CryptoConfig class - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.cryptoconfig.aspx MSDN] |
|||
RC2 class and RC2CryptoServiceProvider class |
|||
:RC2 class - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.rc2.aspx 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 - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.protecteddata(vs.80).aspx MSDN] |
|||
:ProtectedMemory class - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.protectedmemory(vs.80).aspx MSDN] |
|||
RijndaelManaged class and RijndaelManagedTransform class |
|||
:RijndaelManaged class - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.rijndaelmanaged.aspx MSDN] |
|||
:RijndaelManagedTransform class - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.rijndaelmanagedtransform.aspx MSDN] |
|||
CspParameters class - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.cspparameters.aspx MSDN] |
|||
CryptoAPITransform class - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.cryptoapitransform.aspx MSDN] |
|||
Hash-based Message Authentication Code (HMAC) - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.hmac.aspx MSDN] |
|||
:HMACMD5 class - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.hmacmd5.aspx MSDN] |
|||
:HMACRIPEMD160 class - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.hmacripemd160.aspx MSDN] |
|||
:HMACSHA1 class - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.hmacsha1(vs.80).aspx MSDN] |
|||
:HMACSHA256 class - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.hmacsha256.aspx MSDN] |
|||
:HMACSHA384 class - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.hmacsha384.aspx MSDN] |
|||
:HMACSHA512 class - [http://msdn2.microsoft.com/en-us/library/system.security.cryptography.hmacsha512.aspx MSDN] |
|||
====Control permissions==== |
|||
'''Exam objective: '''Control permissions for resources by using the System.Security.Permission classes. |
|||
(Refer System.Security.Permission namespace) |
|||
SecurityPermission class - [http://msdn2.microsoft.com/en-us/library/system.security.permissions.securitypermission.aspx MSDN] |
|||
PrincipalPermission class - [http://msdn2.microsoft.com/en-us/library/system.security.permissions.principalpermission(VS.80).aspx MSDN] |
|||
FileIOPermission class - [http://msdn2.microsoft.com/en-us/library/system.security.permissions.fileiopermission.aspx 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 - [http://msdn2.microsoft.com/en-us/library/system.security.permissions.strongnameidentitypermission.aspx MSDN] |
|||
UIPermission class - [http://msdn2.microsoft.com/en-us/library/system.security.permissions.uipermission.aspx MSDN] |
|||
UrlIdentityPermission class - [http://msdn2.microsoft.com/en-us/library/system.security.permissions.urlidentitypermission.aspx MSDN] |
|||
PublisherIdentityPermission class - [http://msdn2.microsoft.com/en-us/library/system.security.permissions.publisheridentitypermission.aspx MSDN] |
|||
GacIdentityPermission class - [http://msdn2.microsoft.com/en-us/library/system.security.permissions.gacidentitypermission.aspx MSDN] |
|||
FileDialogPermission class - [http://msdn2.microsoft.com/en-us/library/system.security.permissions.filedialogpermission.aspx MSDN] |
|||
DataProtectionPermission class - [http://msdn2.microsoft.com/en-us/library/system.security.permissions.dataprotectionpermission.aspx MSDN] |
|||
EnvironmentPermission class - [http://msdn2.microsoft.com/en-us/library/system.security.permissions.environmentpermission.aspx MSDN] |
|||
IUnrestrictedPermission interface - [http://msdn2.microsoft.com/en-us/library/system.security.permissions.iunrestrictedpermission.aspx MSDN] |
|||
RegistryPermission class - [http://msdn2.microsoft.com/en-us/library/system.security.permissions.registrypermission.aspx MSDN] |
|||
IsolatedStorageFilePermission class - [http://msdn2.microsoft.com/en-us/library/system.security.permissions.isolatedstoragefilepermission(VS.80).aspx MSDN] |
|||
KeyContainerPermission class - [http://msdn2.microsoft.com/en-us/library/system.security.permissions.keycontainerpermission.aspx MSDN] |
|||
ReflectionPermission class - [http://msdn2.microsoft.com/en-us/library/system.security.permissions.reflectionpermission.aspx MSDN] |
|||
StorePermission class - [http://msdn2.microsoft.com/en-us/library/system.security.permissions.storepermission.aspx MSDN] |
|||
SiteIdentityPermission class - [http://msdn2.microsoft.com/en-us/library/system.security.permissions.siteidentitypermission.aspx MSDN] |
|||
ZoneIdentityPermission class - [http://msdn2.microsoft.com/en-us/library/system.security.permissions.zoneidentitypermission.aspx 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 - [http://msdn2.microsoft.com/en-us/library/system.security.policy.applicationsecurityinfo.aspx MSDN] |
|||
:ApplicationSecurityManager class - [http://msdn2.microsoft.com/en-us/library/system.security.policy.applicationsecuritymanager.aspx MSDN] |
|||
ApplicationTrust class and ApplicationTrustCollection class |
|||
:ApplicationTrust class - [http://msdn2.microsoft.com/en-us/library/system.security.policy.applicationtrust.aspx MSDN] |
|||
:ApplicationTrustCollection class - [http://msdn2.microsoft.com/en-us/library/system.security.policy.applicationtrustcollection.aspx MSDN] |
|||
Evidence class and PermissionRequestEvidence class |
|||
:Evidence class - [http://msdn2.microsoft.com/en-us/library/system.security.policy.evidence.aspx MSDN] |
|||
:PermissionRequestEvidence class - [http://msdn2.microsoft.com/en-us/library/system.security.policy.permissionrequestevidence.aspx MSDN] |
|||
CodeGroup class, FileCodeGroup class, FirstMatchCodeGroup class, NetCodeGroup class, and UnionCodeGroup class |
|||
:CodeGroup class - [http://msdn2.microsoft.com/en-us/library/system.security.policy.codegroup.aspx MSDN] |
|||
:FileCodeGroup class - [http://msdn2.microsoft.com/en-us/library/system.security.policy.filecodegroup.aspx MSDN] |
|||
:FirstMatchCodeGroup class - [http://msdn2.microsoft.com/en-us/library/system.security.policy.firstmatchcodegroup.aspx MSDN] |
|||
:NetCodeGroup class - [http://msdn2.microsoft.com/en-us/library/system.security.policy.netcodegroup.aspx MSDN] |
|||
:UnionCodeGroup class - [http://msdn2.microsoft.com/en-us/library/system.security.policy.unioncodegroup.aspx MSDN] |
|||
Condition classes |
|||
:AllMembershipCondition class - [http://msdn2.microsoft.com/en-us/library/system.security.policy.allmembershipcondition.aspx MSDN] |
|||
:ApplicationDirectory class and ApplicationDirectoryMembershipCondition class |
|||
::ApplicationDirectory class - [http://msdn2.microsoft.com/en-us/library/system.security.policy.applicationdirectory.aspx MSDN] |
|||
::ApplicationDirectoryMembershipCondition class - [http://msdn2.microsoft.com/en-us/library/system.security.policy.applicationdirectorymembershipcondition.aspx MSDN] |
|||
:GacMembership class and GacMembershipCondition class |
|||
::GacMembership class |
|||
:::No search results on MSDN!? a little investigation required here. |
|||
::GacMembershipCondition class - [http://msdn2.microsoft.com/en-us/library/system.security.policy.gacmembershipcondition.aspx MSDN] |
|||
:Hash class and HashMembershipCondition class |
|||
::Hash class - [http://msdn2.microsoft.com/en-us/library/system.security.policy.hash.aspx MSDN] |
|||
::HashMembershipCondition class - [http://msdn2.microsoft.com/en-us/library/system.security.policy.hashmembershipcondition.aspx MSDN] |
|||
:Publisher class and PublisherMembershipCondition class |
|||
::Publisher class - [http://msdn2.microsoft.com/en-us/library/system.security.policy.publisher.aspx MSDN] |
|||
::PublisherMembershipCondition class - [http://msdn2.microsoft.com/en-us/library/system.security.policy.publishermembershipcondition.aspx MSDN] |
|||
:Site class and SiteMembershipCondition class |
|||
::Site class - [http://msdn2.microsoft.com/en-us/library/system.security.policy.site.aspx MSDN] |
|||
::SiteMembershipCondition class - [http://msdn2.microsoft.com/en-us/library/system.security.policy.sitemembershipcondition.aspx MSDN] |
|||
:StrongName class and StrongNameMembershipCondition class |
|||
::StrongName class - [http://msdn2.microsoft.com/en-us/library/system.security.policy.strongname.aspx MSDN] |
|||
::StrongNameMembershipCondition class - [http://msdn2.microsoft.com/en-us/library/system.security.policy.strongnamemembershipcondition.aspx MSDN] |
|||
:Url class and UrlMembershipConditon class |
|||
::Url class - [http://msdn2.microsoft.com/en-us/library/system.security.policy.url.aspx MSDN] |
|||
::UrlMembershipConditon class |
|||
:::To be investigated, no search result on MSDN except exam objective :-) |
|||
:Zone class and ZoneMembershipCondition class |
|||
::Zone class - [http://msdn2.microsoft.com/en-us/library/system.security.policy.zone.aspx MSDN] |
|||
::ZoneMembershipCondition class - [http://msdn2.microsoft.com/en-us/library/system.security.policy.zonemembershipcondition.aspx MSDN] |
|||
PolicyLevel class and PolicyStatement class |
|||
:PolicyLevel class - [http://msdn2.microsoft.com/en-us/library/system.security.policy.policylevel.aspx MSDN] |
|||
:PolicyStatement class - [http://msdn2.microsoft.com/en-us/library/system.security.policy.policystatement.aspx MSDN] |
|||
IApplicationTrustManager interface, IMembershipCondition interface, and IIdentityPermissionFactory interface |
|||
:IApplicationTrustManager interface - [http://msdn2.microsoft.com/en-us/library/system.security.policy.iapplicationtrustmanager.aspx MSDN] |
|||
:IMembershipCondition interface - [http://msdn2.microsoft.com/en-us/library/system.security.policy.imembershipcondition.aspx MSDN] |
|||
:IIdentityPermissionFactory interface - [http://msdn2.microsoft.com/en-us/library/system.security.policy.iidentitypermissionfactory.aspx 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 - [http://msdn2.microsoft.com/en-us/library/system.security.principal.genericidentity.aspx MSDN] |
|||
:GenericPrincipal class - [http://msdn2.microsoft.com/en-us/library/system.security.principal.genericprincipal.aspx MSDN] |
|||
WindowsIdentity class and WindowsPrincipal class |
|||
:WindowsIdentity class - [http://msdn2.microsoft.com/en-us/library/system.security.principal.windowsidentity.aspx MSDN] |
|||
:WindowsPrincipal class - [http://msdn2.microsoft.com/en-us/library/system.security.principal.windowsprincipal.aspx MSDN] |
|||
NTAccount class and SecurityIdentifier class |
|||
:NTAccount class - [http://msdn2.microsoft.com/en-us/library/system.security.principal.ntaccount.aspx MSDN] |
|||
:SecurityIdentifier class - [http://msdn2.microsoft.com/en-us/library/system.security.principal.securityidentifier.aspx MSDN] |
|||
IIdentity interface and IPrincipal interface |
|||
:IIdentity interface - [http://msdn2.microsoft.com/en-us/library/system.security.principal.iidentity.aspx MSDN] |
|||
:IPrincipal interface - [http://msdn2.microsoft.com/en-us/library/system.security.principal.iprincipal.aspx MSDN] |
|||
WindowsImpersonationContext class - [http://msdn2.microsoft.com/en-us/library/system.security.principal.windowsimpersonationcontext.aspx MSDN] |
|||
IdentityReference class and IdentityReferenceCollection class |
|||
:IdentityReference class - [http://msdn2.microsoft.com/en-us/library/system.security.principal.identityreference(vs.80).aspx MSDN] |
|||
:IdentityReferenceCollection class - [http://msdn2.microsoft.com/en-us/library/system.security.principal.identityreferencecollection.aspx MSDN] |
|||
==Interoperability, Reflection, and Mailing== |
|||
'''Exam objective: '''Implementing interoperability, reflection, and mailing functionality in a .NET Framework application |
|||
===Topics=== |
|||
====Interoperability==== |
|||
====Reflection==== |
|||
{{wikipedia|Reflection_%28computer_science%29}} |
|||
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 [http://msdn2.microsoft.com/en-us/library/z6tx9dw3(VS.71).aspx MSDN] |
|||
Import a type library as an assembly - [http://msdn2.microsoft.com/en-us/library/xwzy44e4(VS.71).aspx MSDN] |
|||
:Add references to type libraries |
|||
::Same link as above, see second paragraph. |
|||
:Type Library Importer (Tlbimp.exe) - [http://msdn2.microsoft.com/en-us/library/tt0cf3sx(VS.71).aspx MSDN] |
|||
:Generate interop assemblies from type libraries - [http://msdn2.microsoft.com/en-us/library/k83zzh38(VS.71).aspx MSDN] |
|||
::Imported Library Conversion - [http://msdn2.microsoft.com/en-us/library/cwhhsx92(VS.71).aspx MSDN] |
|||
::Imported Module Conversion - [http://msdn2.microsoft.com/en-us/library/b6y86f64(VS.71).aspx MSDN] |
|||
::Imported Type Conversion - [http://msdn2.microsoft.com/en-us/library/s8sdycxx(VS.71).aspx MSDN] |
|||
::Imported Member Conversion - [http://msdn2.microsoft.com/en-us/library/k639e386(VS.71).aspx MSDN] |
|||
::Imported Parameter Conversion - [http://msdn2.microsoft.com/en-us/library/k9c48sba(VS.71).aspx MSDN] |
|||
:TypeConverter class - [http://msdn2.microsoft.com/en-us/library/system.componentmodel.typeconverter.aspx MSDN] |
|||
Create COM types in managed code - [http://msdn2.microsoft.com/en-us/library/3y76b69k(VS.71).aspx MSDN] |
|||
Compile an interop project - [http://msdn2.microsoft.com/en-us/library/538aes2a(VS.71).aspx MSDN] |
|||
Deploy an interop application - [http://msdn2.microsoft.com/en-us/library/tc0204w0(VS.71).aspx MSDN] |
|||
=====Exposing .NET Framework Components to COM===== |
|||
:The rest of the objectives of that section directly refers to [http://msdn2.microsoft.com/en-us/library/zsfww439(VS.71).aspx MSDN] |
|||
Qualify the .NET Framework types for interoperation - [http://msdn2.microsoft.com/en-us/library/7fcfby2t(VS.71).aspx MSDN] |
|||
Apply Interop attributes, such as the ComVisibleAttribute class - [http://msdn2.microsoft.com/en-us/library/d4w8x20h(VS.71).aspx MSDN] |
|||
Package an assembly for COM - [http://msdn2.microsoft.com/en-us/library/bctyca52(VS.71).aspx MSDN] |
|||
Deploy an application for COM access - [http://msdn2.microsoft.com/en-us/library/c2850st8(VS.71).aspx 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 - [http://msdn2.microsoft.com/en-us/library/0h9e9t7d.aspx MSDN] |
|||
Create a class to hold DLL functions - [http://msdn2.microsoft.com/en-us/library/khbsw73t.aspx MSDN] |
|||
Create prototypes in managed code - [http://msdn2.microsoft.com/en-us/library/w4byd5y4.aspx MSDN] |
|||
:DllImportAttribute class - [http://msdn2.microsoft.com/en-us/library/system.runtime.interopservices.dllimportattribute.aspx MSND] |
|||
Call a DLL function - [http://msdn2.microsoft.com/en-us/library/be80xase.aspx 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 - [http://msdn2.microsoft.com/en-us/library/awbckfbz.aspx MSDN] |
|||
:Implementing callback functions - [http://msdn2.microsoft.com/en-us/library/d186xcf0.aspx MSDN] |
|||
Create a new Exception class and map it to an HRESULT - [http://msdn2.microsoft.com/en-us/library/9ztbc5s1.aspx MSDN] |
|||
Default marshaling behavior - [http://msdn2.microsoft.com/en-us/library/zah6xy75.aspx MSDN] |
|||
Marshal data with Platform Invoke - [http://msdn2.microsoft.com/en-us/fzhhdwae.aspx MSDN] |
|||
Marshal data with COM Interop - [http://msdn2.microsoft.com/en-us/library/9f9f3yxf.aspx MSDN] |
|||
MarshalAsAttribute class and Marshal class |
|||
:MarshalAsAttribute class - [http://msdn2.microsoft.com/en-us/library/system.runtime.interopservices.marshalasattribute.aspx MSDN] |
|||
:Marshal class - [http://msdn2.microsoft.com/en-us/library/system.runtime.interopservices.marshal.aspx 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 -[http://msdn2.microsoft.com/en-us/library/system.reflection.assembly.aspx MSDN] |
|||
Assembly attributes - [http://msdn2.microsoft.com/en-us/library/4w8c1y2s.aspx MSDN] |
|||
:AssemblyAlgorithmIdAttribute class - [AssemblyAlgorithmIdAttribute class MSDN] |
|||
:AssemblyCompanyAttribute class - [http://msdn2.microsoft.com/en-us/library/system.reflection.assemblycompanyattribute.aspx MSDN] |
|||
:AssemblyConfigurationAttribute class - [http://msdn2.microsoft.com/en-us/library/system.reflection.assemblyconfigurationattribute.aspx MSDN] |
|||
:AssemblyCopyrightAttribute class - [http://msdn2.microsoft.com/en-us/library/system.reflection.assemblycopyrightattribute.aspx MSDN] |
|||
:AssemblyCultureAttribute class - [http://msdn2.microsoft.com/en-us/library/system.reflection.assemblycultureattribute.aspx MSDN] |
|||
:AssemblyDefaultAliasAttribute class - [http://msdn2.microsoft.com/en-us/library/system.reflection.assemblydefaultaliasattribute.aspx MSDN] |
|||
:AssemblyDelaySignAttribute class - [http://msdn2.microsoft.com/en-us/library/system.reflection.assemblydelaysignattribute.aspx MSDN] |
|||
:AssemblyDescriptionAttribute class - [http://msdn2.microsoft.com/en-us/library/system.reflection.assemblydescriptionattribute.aspx MSDN] |
|||
:AssemblyFileVersionAttribute class - [http://msdn2.microsoft.com/en-us/library/system.reflection.assemblyfileversionattribute.aspx MSDN] |
|||
:AssemblyFlagsAttribute class - [http://msdn2.microsoft.com/en-us/library/system.reflection.assemblyflagsattribute.aspx MSDN] |
|||
:AssemblyInformationalVersionAttribute class - [http://msdn2.microsoft.com/en-us/library/system.reflection.assemblyinformationalversionattribute.aspx MSDN] |
|||
:AssemblyKeyFileAttribute class - [http://msdn2.microsoft.com/en-us/library/system.reflection.assemblykeyfileattribute.aspx MSDN] |
|||
:AssemblyTitleAttribute class - [http://msdn2.microsoft.com/en-us/library/system.reflection.assemblytitleattribute.aspx MSDN] |
|||
:AssemblyTrademarkAttribute class - [http://msdn2.microsoft.com/en-us/library/system.reflection.assemblytrademarkattribute.aspx MSDN] |
|||
:AssemblyVersionAttribute class - [http://msdn2.microsoft.com/en-us/library/system.reflection.assemblyversionattribute.aspx MSDN] |
|||
Info classes |
|||
:ConstructorInfo class - [http://msdn2.microsoft.com/en-us/library/system.reflection.constructorinfo.aspx MSDN] |
|||
:MethodInfo class - [http://msdn2.microsoft.com/en-us/library/system.reflection.methodinfo.aspx MSDN] |
|||
:MemberInfo class - [http://msdn2.microsoft.com/en-us/library/system.reflection.memberinfo.aspx MSDN] |
|||
:PropertyInfo class - [http://msdn2.microsoft.com/en-us/library/system.reflection.propertyinfo.aspx MSDN] |
|||
:FieldInfo class - [http://msdn2.microsoft.com/en-us/library/system.reflection.fieldinfo.aspx MSDN] |
|||
:EventInfo class - [http://msdn2.microsoft.com/en-us/library/system.reflection.eventinfo.aspx MSDN] |
|||
:LocalVariableInfo class - [http://msdn2.microsoft.com/en-us/library/system.reflection.localvariableinfo.aspx MSDN] |
|||
Binder class and BindingFlags - [http://msdn2.microsoft.com/en-us/library/system.reflection.binder.aspx MSDN] |
|||
MethodBase class and MethodBody class |
|||
:MethodBase class - [http://msdn2.microsoft.com/en-us/library/system.reflection.methodbase.aspx MSDN] |
|||
:MethodBody class - [http://msdn2.microsoft.com/en-us/library/system.reflection.methodbody.aspx MSDN] |
|||
Builder classes |
|||
:AssemblyBuilder class - [http://msdn2.microsoft.com/en-us/library/system.reflection.emit.assemblybuilder.aspx MSDN] |
|||
:ConstructorBuilder class - [http://msdn2.microsoft.com/en-us/library/system.reflection.emit.constructorbuilder.aspx MSDN] |
|||
:EnumBuilder class - [http://msdn2.microsoft.com/en-us/library/system.reflection.emit.enumbuilder.aspx MSDN] |
|||
:EventBuilder class - [http://msdn2.microsoft.com/en-us/library/system.reflection.emit.eventbuilder.aspx MSDN] |
|||
:FieldBuilder class - [http://msdn2.microsoft.com/en-us/library/system.reflection.emit.fieldbuilder.aspx MSDN] |
|||
:LocalBuilder class - [http://msdn2.microsoft.com/en-us/library/system.reflection.emit.localbuilder.aspx MSDN] |
|||
:MethodBuilder class - [http://msdn2.microsoft.com/en-us/library/system.reflection.emit.methodbuilder.aspx MSDN] |
|||
:ModuleBuilder class - [http://msdn2.microsoft.com/en-us/library/system.reflection.emit.modulebuilder.aspx MSDN] |
|||
:ParameterBuilder class - [http://msdn2.microsoft.com/en-us/library/system.reflection.emit.parameterbuilder.aspx MSDN] |
|||
:PropertyBuilder class - [http://msdn2.microsoft.com/en-us/library/system.reflection.emit.propertybuilder.aspx MSDN] |
|||
:TypeBuilder class - [http://msdn2.microsoft.com/en-us/library/system.reflection.emit.typebuilder.aspx 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 - [http://msdn2.microsoft.com/en-us/library/system.net.mail.mailmessage.aspx MSDN] |
|||
MailAddress class and MailAddressCollection class |
|||
:MailAddress class - [http://msdn2.microsoft.com/en-us/library/system.net.mail.mailaddress.aspx MSDN] |
|||
:MailAddressCollection class - [http://msdn2.microsoft.com/en-us/library/system.net.mail.mailaddresscollection.aspx MSDN] |
|||
SmtpClient class, SmtpPermission class, and SmtpPermissionAttribute class |
|||
:SmtpClient class - [http://msdn2.microsoft.com/en-us/library/system.net.mail.smtpclient.aspx MSDN] |
|||
:SmtpPermission class - [http://msdn2.microsoft.com/en-us/library/system.net.mail.smtppermission.aspx MSDN] |
|||
:SmtpPermissionAttribute class - [http://msdn2.microsoft.com/en-us/library/system.net.mail.smtppermissionattribute.aspx MSDN] |
|||
Attachment class, AttachmentBase class, and AttachmentCollection class |
|||
:Attachment class - [http://msdn2.microsoft.com/en-us/library/system.net.mail.attachment.aspx MSDN] |
|||
:AttachmentBase class - [http://msdn2.microsoft.com/en-us/library/system.net.mail.attachmentbase.aspx MSDN] |
|||
:AttachmentCollection class - [http://msdn2.microsoft.com/en-us/library/system.net.mail.attachmentcollection.aspx MSDN] |
|||
SmtpException class, SmtpFailedReceipientException class, and SmtpFailedReceipientsException class |
|||
:SmtpException class - [http://msdn2.microsoft.com/en-us/library/system.net.mail.smtpexception.aspx MSDN] |
|||
:SmtpFailedReceipientException class - [http://msdn2.microsoft.com/en-us/library/system.net.mail.smtpfailedrecipientexception.aspx MSDN] |
|||
::Please note that there is a typo in the exam objective page here, they use SmtpFailedReceipientException insteand of SmtpFailedRecipientException. |
|||
:SmtpFailedRecipientsException class - [http://msdn2.microsoft.com/en-us/library/system.net.mail.smtpfailedrecipientsexception.aspx 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 - [http://msdn2.microsoft.com/en-us/library/system.net.mail.linkedresource.aspx MSDN] |
|||
:LinkedResourceCollection class - [http://msdn2.microsoft.com/en-us/library/system.net.mail.linkedresourcecollection.aspx MSDN] |
|||
AlternateView class and AlternateViewCollection class |
|||
:AlternateView class - [http://msdn2.microsoft.com/en-us/library/system.net.mail.alternateview.aspx MSDN] |
|||
:AlternateViewCollection class - [http://msdn2.microsoft.com/en-us/library/system.net.mail.alternateviewcollection.aspx 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|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|StringBuilder class]] that serves for efficent construction. |
|||
=====Regular expressions===== |
|||
{{wikipedia|Regular_expressions}} |
|||
The [[#Regex_class|Regex]], [[#Match class and MatchCollection class|Match]] and [[#Group class and GroupCollection class|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 [[Regex|regular expressions]] which, among other things, point to this [http://en.kerouac3001.com/regex-tutorial-8.htm 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 - [http://msdn2.microsoft.com/en-us/library/system.globalization.cultureinfo.aspx MSDN] |
|||
CultureTypes enumeration - [http://msdn2.microsoft.com/en-us/library/system.globalization.culturetypes.aspx MSDN] |
|||
RegionInfo class - [http://msdn2.microsoft.com/en-us/library/system.globalization.regioninfo.aspx MSDN] |
|||
=====Format date and time values based on the culture.===== |
|||
DateTimeFormatInfo class - [http://msdn2.microsoft.com/en-us/library/system.globalization.datetimeformatinfo.aspx MSDN] |
|||
=====Format number values based on the culture.===== |
|||
NumberFormatInfo class - [http://msdn2.microsoft.com/en-us/library/system.globalization.numberformatinfo.aspx MSDN] |
|||
NumberStyles enumeration - [http://msdn2.microsoft.com/en-us/library/system.globalization.numberstyles.aspx MSDN] |
|||
=====Perform culture-sensitive string comparison.===== |
|||
CompareInfo class - [http://msdn2.microsoft.com/en-us/library/system.globalization.compareinfo.aspx MSDN] |
|||
CompareOptions enumeration - [http://msdn2.microsoft.com/en-us/library/system.globalization.compareoptions.aspx MSDN] |
|||
=====Custom culture===== |
|||
'''Exam objective: '''Build a custom culture class based on existing culture and region classes |
|||
CultureAndRegionInfoBuilder class - [http://msdn2.microsoft.com/en-us/library/system.globalization.cultureandregioninfobuilder.aspx 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 - [http://msdn2.microsoft.com/en-us/library/system.drawing.brush.aspx MSDN] |
|||
Brushes class - [http://msdn2.microsoft.com/en-us/library/system.drawing.brushes.aspx MSDN] |
|||
SystemBrushes class - [http://msdn2.microsoft.com/en-us/library/system.drawing.systembrushes.aspx MSDN] |
|||
TextureBrush class - [http://msdn2.microsoft.com/en-us/library/ms534512.aspx MSDN] |
|||
Pen class - [http://msdn2.microsoft.com/en-us/library/system.drawing.pen.aspx MSDN] |
|||
Pens class - [http://msdn2.microsoft.com/en-us/library/system.drawing.pens.aspx MSDN] |
|||
SystemPens class - [http://msdn2.microsoft.com/en-us/library/system.drawing.systempens.aspx MSDN] |
|||
SolidBrush class - [http://msdn2.microsoft.com/en-us/library/ms534508.aspx MSDN] |
|||
Color structure - [http://msdn2.microsoft.com/en-us/library/system.drawing.color.aspx MSDN] |
|||
ColorConverter class - [http://msdn2.microsoft.com/en-us/library/system.drawing.colorconverter.aspx MSDN] |
|||
ColorTranslator class - [http://msdn2.microsoft.com/en-us/library/system.drawing.colortranslator(vs.71).aspx MSDN] |
|||
SystemColors class - [http://msdn2.microsoft.com/en-us/library/system.drawing.systemcolors.aspx MSDN] |
|||
StringFormat class - [http://msdn2.microsoft.com/en-us/library/system.drawing.stringformat.aspx MSDN] |
|||
Font class - [http://msdn2.microsoft.com/en-us/library/system.drawing.font(VS.71).aspx MSDN] |
|||
FontConverter class - [http://msdn2.microsoft.com/en-us/library/system.drawing.fontconverter.aspx MSDN] |
|||
FontFamily class - [http://msdn2.microsoft.com/en-us/library/system.windows.media.fontfamily.aspx MSDN] |
|||
SystemFonts class - [http://msdn2.microsoft.com/en-us/library/system.windows.systemfonts.aspx 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 - [http://msdn2.microsoft.com/en-us/library/system.drawing.graphics.aspx MSDN] |
|||
BufferedGraphics class - [http://msdn2.microsoft.com/en-us/library/system.drawing.bufferedgraphics.aspx MSDN] |
|||
BufferedGraphicsManager class - [http://msdn2.microsoft.com/en-us/library/system.drawing.bufferedgraphicsmanager(vs.80).aspx MSDN] |
|||
Image class - [http://msdn2.microsoft.com/en-us/library/system.windows.controls.image.aspx MSDN] |
|||
ImageConverter class - [http://msdn2.microsoft.com/en-us/library/system.drawing.imageconverter.aspx MSDN] |
|||
ImageAnimator class - [http://msdn2.microsoft.com/en-us/library/system.drawing.imageanimator.aspx MSDN] |
|||
Bitmap class - [http://msdn2.microsoft.com/en-us/library/system.drawing.bitmap.aspx MSDN] |
|||
Icon class - [http://msdn2.microsoft.com/en-us/library/system.drawing.icon.aspx MSDN] |
|||
IconConverter class - [http://msdn2.microsoft.com/en-us/library/system.drawing.iconconverter.aspx MSDN] |
|||
SystemIcons class - [http://msdn2.microsoft.com/en-us/library/system.drawing.systemicons.aspx MSDN] |
|||
=====Shapes and Sizes===== |
|||
'''Exam objective: '''Enhance the user interface of a .NET Framework application by using shapes and sizes |
|||
Point Structure - [http://msdn2.microsoft.com/en-us/library/system.drawing.point.aspx MSDN] |
|||
PointConverter class - [http://msdn2.microsoft.com/en-us/library/system.drawing.pointconverter.aspx MSDN] |
|||
Rectangle Structure - [http://msdn2.microsoft.com/en-us/library/system.drawing.rectangle.aspx MSDN] |
|||
RectangleConverter class - [http://msdn2.microsoft.com/en-us/library/system.drawing.rectangleconverter.aspx MSDN] |
|||
Size Structure - [http://msdn2.microsoft.com/en-us/library/system.windows.size.aspx MSDN] |
|||
SizeConverter class - [http://msdn2.microsoft.com/en-us/library/system.drawing.sizeconverter.aspx MSDN] |
|||
Region class - [http://msdn2.microsoft.com/en-us/library/system.drawing.region.aspx 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 - [http://msdn2.microsoft.com/en-us/library/system.string(VS.80).aspx MSDN] |
|||
=====StringBuilder class===== |
|||
[[Study Guides:Microsoft Certified Professional Developer (MCPD)\Exam 70-536\StringBuilder class|StringBuilder class]] <br> |
|||
=====Regex class===== |
|||
Regex class - [http://msdn2.microsoft.com/en-us/library/system.text.regularexpressions.regex(VS.80).aspx MSDN] |
|||
=====Match class and MatchCollection class===== |
|||
Match class - [http://msdn2.microsoft.com/en-us/library/system.text.regularexpressions.match.aspx MSDN] |
|||
MatchCollection class - [http://msdn2.microsoft.com/en-us/library/system.text.regularexpressions.matchcollection.aspx MSDN] |
|||
=====Group class and GroupCollection class===== |
|||
Group class - [http://msdn2.microsoft.com/en-us/library/system.text.regularexpressions.group.aspx MSDN] |
|||
GroupCollection class - [http://msdn2.microsoft.com/en-us/library/system.text.regularexpressions.groupcollection(VS.71).aspx MSDN] |
|||
=====Encode text by using Encoding classes===== |
|||
Encoding class - [http://msdn2.microsoft.com/en-us/library/system.text.encoding.aspx MSDN] |
|||
EncodingInfo class - [http://msdn2.microsoft.com/en-us/library/system.text.encodinginfo.aspx MSDN] |
|||
ASCIIEncoding class - [http://msdn2.microsoft.com/en-us/library/system.text.asciiencoding.aspx MSDN] |
|||
UnicodeEncoding class - [http://msdn2.microsoft.com/en-us/library/system.text.unicodeencoding(VS.71).aspx MSDN] |
|||
UTF8Encoding class - [http://msdn2.microsoft.com/en-us/library/system.text.utf8encoding.aspx MSDN] |
|||
Encoding Fallback classes - [http://msdn2.microsoft.com/en-us/library/tt6z1500(VS.80).aspx MSDN] |
|||
=====Decode text by using Decoding classes.===== |
|||
Decoder class - [http://msdn2.microsoft.com/en-us/library/system.text.decoder.aspx MSDN] |
|||
Decoder Fallback classes - [http://msdn2.microsoft.com/en-us/library/system.text.decoderfallback.aspx MSDN] |
|||
=====Capture class and CaptureCollection class===== |
|||
Capture class - [http://msdn2.microsoft.com/en-us/library/system.text.regularexpressions.capture.aspx MSDN] |
|||
CaptureCollection class - [http://msdn2.microsoft.com/en-us/library/system.text.regularexpressions.capturecollection(VS.71).aspx MSDN] |
|||
[[Category:Microsoft Certified Professional Developer]] |
[[Category:Microsoft Certified Professional Developer]] |
||
==See also== |
|||
*[[Microsoft Certified Professional Developer]] |
|||
==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 [http://www.microsoft.com/learning/mcp/mcts/winapps/default.mspx 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 [http://www.microsoft.com/learning/mcp/mcts/winapps/default.mspx MCPD]) |
|||
== External links == |
|||
* [https://www.microsoft.com/learning/exams/70-536.asp Exam 70-536 Preparation Guide] |
Revision as of 16:16, 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 though 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 every 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.
The most difficult aspect of a book like this one is to keep a balance between having enough content to cover and explain every objective of the exam and not too much content because reading and studying time should be kept to a manageable level. Furthermore, there is no reason to cover content here that is not directly related to exam objectives.
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:
- a "revision questions" section for each chapter where we could discuss the kind of questions that could be asked at the exam.
- 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 what 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 system. 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 language. 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, service and 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. And then for an overview of the the class libraries (System types) see MSDN.
Most of the exam is in fact based on how to use the common parts of the type librairies (System types). This is why the list of exam objectives (and this book TOC) is so long.
Hello world
For the newcomers to .NET, you may want to take a little break from the concepts here and make sure that you see how the concepts discussed so far are used in a very simple example. The next concepts are not that trivial. We will put such an example here.
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 their 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 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
Hello world example
System types
Exam objective: Manage data in a .NET Framework application by using the .NET Framework 2.0 system types.
(Refer System namespace)
Value types usage
Following are some "usage" oriented remarks about value types.
Value types contain the values they are assigned:
int a = 1; // the variable "a" contains "1" of value type int
Value types can also be created by using the new keyword. Using the new keyword initializes the variable with the default value obtained from the type's default constructor:
int a = new int(); // using the default constructor via the new keyword return a; // returns "0" in the case of type Int.
Value types can be declared without being initialized, but they must be initialized to some value before being used:
int a; // This is perfectly acceptable return a; // NOT acceptable! You can't use "a" because "a" doesn't have a value!
Value types cannot equal null. .NET 2.0 provides a Nullable type to get around this limitation, which is discussed in the next section, but null is not a valid value for value types:
int a = null; // Won't compile - throws an error.
If you copy a Value type to another Value type, the value is copied. Changing the value of the copy has no effect on the value of the original. The second is merely a copy of the first - they are in no way connected after assignment. This is fairly intuitive:
int var1 = 1; int var2 = var1; //the value of var1 (a "1" of type int) is copied to var2 var2 = 25; // The "1" value in var2 is overwritten with "25" Console.WriteLine("The value of var1 is {0}, the value of var2 is {1}", var1, var2);
Which would result in the output:
The value of var1 is 1, the value of var2 is 25
Changing the value of the copy (var2 in this instance) had no effect on the value of the original (var1). This is different from reference types which copy a reference to the value, not the value itself.
Nullable type
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)