Compact Framework v2 Base Class Library
http://www.brains-N-brawn.com/cfBcl
8/6/2004 
Introduction
when i started programming with the Compact Framework (over 2 years
ago) ... it seemed like it was missing every class i needed. i kept
comparing it to the full framework, and it just could not compete. after a
couple months i got used to implementing functionality that was missing, or
pInvoking the OS to expose it to managed code ... and now i think CF offers
more than what i need. i've got a good handle on what CF v1 provides, so really
just wanted to see what CF v2 adds. saw a couple postings about API changes for
Whidbey desktop, and decided to do a similar exercise for CF. so this article
will show what has been added to the API for CF v2. the pic below is my app for
reflecting against CF V1 and V2

Assemblies
the charts below show some metadata for the assemblies of V1 and
V2. notice that V1 does not have System.Messaging and V2 does not have
System.Data.Common. for V2 it looks like System.Data.Common is now a part of
the System.Data assembly. the System.Web.Services assembly shrunk too, my
assumption is that the functionality moved to System.Xml
| assembly | size | types | public types | public methods | properties | events |
| GAC_Microsoft.VisualBasic_v7 | 144 | 77 | 49 | 422 | 22 | 0 |
| GAC_Microsoft.WindowsCE.Forms_v1 | 10 | 14 | 3 | 38 | 9 | 2 |
| GAC_mscorlib_v1 | 386 | 421 | 283 | 3505 | 595 | 0 |
| GAC_System.Data_v1 | 393 | 342 | 80 | 819 | 244 | 13 |
| GAC_System.Data.SqlClient_v1 | 145 | 80 | 19 | 348 | 92 | 9 |
| GAC_System.Data.SqlServerCe_v1 | 121 | 53 | 30 | 416 | 118 | 7 |
| GAC_System_v1 | 250 | 233 | 109 | 1107 | 278 | 3 |
| GAC_System.Drawing_v1 | 37 | 38 | 22 | 412 | 220 | 0 |
| GAC_System.Net.IrDA_v1 | 11 | 8 | 6 | 45 | 9 | 0 |
| GAC_System.Web.Services_v1 | 95 | 94 | 26 | 282 | 104 | 3 |
| GAC_System.Windows.Forms.DataGrid_v1 | 39 | 12 | 7 | 212 | 64 | 21 |
| GAC_System.Windows.Forms_v1 | 137 | 179 | 102 | 3778 | 1006 | 571 |
| GAC_System.Xml_v1 | 190 | 142 | 70 | 1468 | 531 | 6 |
| GAC_System.Data.Common_v1 | 105 | 42 | 27 | 801 | 83 | 3 |
| |
| TOTALS | 2063 | 1735 | 833 | 13653 | 3375 | 638 |
| assembly | size | types | public types | public methods | properties | events |
| GAC_Microsoft.VisualBasic_v8 | 308 | 122 | 63 | 659 | 36 | 0 |
| GAC_Microsoft.WindowsCE.Forms_v2 | 30 | 48 | 25 | 469 | 107 | 50 |
| GAC_mscorlib_v2 | 553 | 531 | 375 | 4656 | 859 | 0 |
| GAC_System.Data_v2 | 649 | 291 | 144 | 2488 | 493 | 30 |
| GAC_System.Data.SqlClient_v3 | 186 | 76 | 17 | 351 | 101 | 9 |
| GAC_System.Data.SqlServerCe_v3 | 206 | 82 | 46 | 841 | 197 | 10 |
| GAC_System_v2 | 324 | 289 | 135 | 1429 | 345 | 9 |
| GAC_System.Drawing_v2 | 44 | 53 | 30 | 495 | 238 | 0 |
| GAC_System.Net.IrDA_v2 | 9 | 8 | 6 | 51 | 9 | 0 |
| GAC_System.Web.Services_v2 | 53 | 49 | 28 | 357 | 130 | 3 |
| GAC_System.Windows.Forms.DataGrid_v2 | 40 | 12 | 7 | 252 | 75 | 25 |
| GAC_System.Windows.Forms_v2 | 186 | 223 | 135 | 6130 | 1609 | 858 |
| GAC_System.Xml_v2 | 944 | 669 | 184 | 3931 | 1399 | 12 |
| GAC_System.Messaging_v2 | 66 | 35 | 19 | 335 | 106 | 4 |
| |
| TOTALS | 3598 | 2488 | 1214 | 22444 | 5704 | 1010 |
Namespaces
these are the namespaces changes that have happened for V2. the new namespace
are marked with RED. each namespace is followed by
the number of NEW types to that namespace. i.e.
all the types will be new for a new namespace. a pre-existing namespace will
only show the number of public types that have been added for V2
- Microsoft.VisualBasic - 9
- Microsoft.VisualBasic.CompilerServices - 5
- Microsoft.WindowsCE.Forms - 22
- MS.Internal.SchemaValidator - 2
- MS.Internal.Xml - 2
- System - 8
- System.Collections - 2
- System.Collections.Specialized - 1
- System.ComponentModel - 10
- System.Configuration.Assemblies - 0
- System.Data - 12
- System.Data.Common - 12
- System.Data.ProviderBase - 1
- System.Data.Sql - 5
- System.Data.SqlClient - 0
- System.Data.SqlServerCe - 16
- System.Data.SqlTypes - 6
- System.Diagnostics - 2
- System.Drawing - 1
- System.Drawing.Drawing2D - 1
- System.Drawing.Imaging - 4
- System.Drawing.Text - 2
- System.Globalization - 0
- System.IO - 0
- System.IO.Ports - 13
- System.Messaging - 19
- System.Net - 1
- System.Net.Sockets - 1
- System.Reflection - 0
- System.Resources - 0
- System.Runtime.CompilerServices - 2
- System.Runtime.InteropServices - 22
- System.Runtime.InteropServices.ComTypes - 5
- System.Runtime.Remoting - 2
- System.Security - 0
- System.Security.Cryptography - 47
- System.Security.Cryptography.X509Certificates - 0
- System.Security.Permissions - 1
- System.Security.Policy - 0
- System.Text - 0
- System.Text.RegularExpressions - 0
- System.Threading - 2
- System.Web.Services - 0
- System.Web.Services.Description - 0
- System.Web.Services.Protocols - 3
- System.Windows.Forms - 33
- System.Xml - 12
- System.Xml.Schema - 77
- System.Xml.Serialization - 20
- System.Xml.XPath - 1
Breaking Changes
these types / methods are in V1, but not in V2
-
Type - System.Text.MLangCodePageEncoding
-
Type - System.Data.PropertyAttributes
-
Type - System.Web.Services.Protocols.SoapDocumentServiceAttribute
-
Method - System.Data.SqlServerCe.SqlCeInfoMessageEventArgs.ErrorCode()
Unique
these are the namespaces, types, and methods that exist in CF v2, but not on the
desktop version of Whidbey.
- Namespace - Microsoft.WindowsCE.Forms
- Namespace - System.Data.SqlServerCe
- Type - Microsoft.VisualBasic.DefaultInstanceProperty
- Type - Microsoft.VisualBasic.MyGroupAttribute
- Type - System.Net.IrDAEndPoint
- Type - System.Net.Sockets.IrDACharacterSet
- Type - System.Net.Sockets.IrDAClient
- Type - System.Net.Sockets.IrDADeviceInfo
- Type - System.Net.Sockets.IrDAHints
- Type - System.Net.Sockets.IrDAListener
- Type - System.Text.MLangCodePageEncoding
- Type - System.Threading.ThreadTerminateException
- Type - System.Windows.Forms.AutoScaleMode
- Type - System.Xml.XmlQualifiedNameTable
- Method - MS.Internal.SchemaValidator.XmlSchemaValidator.SequenceExpected
- Method - System.Drawing.Color.FromSysIcv
- Method - System.Drawing.Font.GetHtx
- Method - System.Drawing.Graphics.FromHow
- Method - System.Drawing.Icon.GetHicnFromIcon
- Method - System.Drawing.Image.GetHowFromImage
- Method - System.Windows.Forms.ContainerControl.AutoScaleDimensions
- Method - System.Windows.Forms.ContainerControl.AutoScaleMode
- Method - System.Windows.Forms.ContainerControl.PerformAutoScale
- Method - System.Windows.Forms.ContainerControl.SystemAutoScaleDimensions
- Method - System.Windows.Forms.DomainUpDown.AutoScaleDimensions
- Method - System.Windows.Forms.DomainUpDown.AutoScaleMode
- Method - System.Windows.Forms.DomainUpDown.PerformAutoScale
- Method - System.Windows.Forms.DomainUpDown.SystemAutoScaleDimensions
- Method - System.Windows.Forms.Form.AutoScaleDimensions
- Method - System.Windows.Forms.Form.AutoScaleMode
- Method - System.Windows.Forms.Form.PerformAutoScale
- Method - System.Windows.Forms.Form.SystemAutoScaleDimensions
- Method - System.Windows.Forms.NumericUpDown.AutoScaleDimensions
- Method - System.Windows.Forms.NumericUpDown.AutoScaleMode
- Method - System.Windows.Forms.NumericUpDown.PerformAutoScale
- Method - System.Windows.Forms.NumericUpDown.SystemAutoScaleDimensions
- Method - System.Windows.Forms.UpDownBase.AutoScaleDimensions
- Method - System.Windows.Forms.UpDownBase.AutoScaleMode
- Method - System.Windows.Forms.UpDownBase.PerformAutoScale
- Method - System.Windows.Forms.UpDownBase.SystemAutoScaleDimensions
- Method - System.Windows.Forms.UserControl.AutoScaleDimensions
- Method - System.Windows.Forms.UserControl.AutoScaleMode
- Method - System.Windows.Forms.UserControl.PerformAutoScale
- Method - System.Windows.Forms.UserControl.SystemAutoScaleDimensions
- Method - System.Xml.Schema.XmlSchemaAttribute.ValueConverter
- Method - System.Xml.Schema.XmlSchemaElement.ValueConverter
- Method - System.Xml.Serialization.XmlArrayItemAttribute.IsNullableSpecified
- Method - System.Xml.Serialization.XmlRootAttribute.IsNullableSpecified
- Method - System.Xml.XmlConvert.FromBinHexString
- Method - System.Xml.XmlConvert.ToBinHexString
- Method - System.Xml.XmlNamespaceManager.HasNamespaceResolver
What's New
the following page shows all the namespaces, public types, and public methods in
CV v2. it is sorted alphabetically by namespace. the types in each namespace
are represented by [C] class, [E]
enum, [S] struct, and [I]
interface. each type lists its Properties, Methods(), and ~Events. the new
items (namespaces, types, methods) are in RED.the
listing on the following link will look like:
PreExistingNamespace
[C] NewClassForV2
NewProperty
NewMethod() ~NewEvent
[E] PreExistingEnumFromV1
OldProperty NewMethod()
OldMethod() ~ OldEvent
Click
to See CF v2 API Changes
Click
to See CF v2 Additions Only
External Links
for devices:
for desktop
Updates
these results are from Whidbey Beta 1 ... the the final release will look
substantially different. i will try to keep this updated to reflect those
changes. i will also update the app for reflecting against the assemblies
to provide more data