Content by Category
.NET 1.x
.NET 2.0
.NET 3.0
.NET 3.5
.NET 4.0
.NET 4.5
.NET Assemblies
.NET Framework
.NET Getting Started
Accessibility
ADO.NET
Advertorials
Agile Development
AJAX
Amazon Web Services
Analysis Services
Android
Architecture
Arduino
ASP .NET Web API
ASP.NET
ASP.NET MVC
ASP.NET WebForms
Azure
B2B (Business Integration)
BDD
Big Data
Bing
BizTalk
Book Excerpts
Build and Deploy
Business Intelligence
C#
C++
ClickOnce
Cloud Computing
Code Contracts
CODE Framework Info - non Technical
CODE on the Road!
COM+
Community
Conferences
Continuous Integration
Crystal Reports
CSLA.NET
CSS
Data
Debugger
Design Patterns
Development Process
Display Technologies
Distributed Computing
Document Database
DotNetNuke
DSL
Dynamic Languages
Dynamic Programming
Editorials
Enterprise Services ("COM+")
Entity Framework
Events
Expression Blend
F#
Fox to Fox
Frameworks
Functional Programming
Git
Graphics
HTML 5
Internet Explorer 8.0
Interviews
IOS
iPhone
Iron Ruby
Java
Java Script
JavaScript
jQuery
JSON
Lightswitch
LINQ
Linux
LUA
Mac OS X
MDX
Messaging
Metro
Microsoft Application Blocks
Microsoft Business Rules Framework
Microsoft Dynamics
Microsoft Expression
Microsoft Office
Mobile Development
Mobile PC
Mono
MsBuild
MVVM
MySQL
Network
NHibernate
node.js
NOSQL
Nuget
Object Oriented Development
Objective C
Odata
OLAP
Open Source
Opinion
Opinions
Oracle
ORM
Other Languages
Parallel Programming
Patterns
PHP
Podcasts
Post Mortem
PowerPoint
Print/Output
Prism
Product News
Product Reviews
Project Management
Prolog
Python
Q&A
Rails
Rake
Razor
Reporting Services
REST
RIA Services
Ruby
Ruby on Rails
Scheme
Search
Security
Services
SharePoint
SignalR
Silverlight
SOA
Social Networks
Software & Law
Software Business
Source Control
Speech-Enabled Applications
SQL Server
SQL Server 2000
SQL Server 2005
SQL Server 2008
SQL Server 2012
SQL Server CE/AnyWhere/Mobile/Compact
SSIS
Subversion
Sync Framework
Tablet PC
TDD
Team System
Techniques
Testing and Quality Control
TFS
Tips
TypeScript
UI Design
UML
User Groups
VB Script
VB.NET
Version Control
VFP and .NET
VFP and SQL Server
Virtual Earth
Vista
Visual Basic
Visual Basic 6 (and older)
Visual FoxPro
Visual Studio .NET
Visual Studio 11
Visual Studio 2005
Visual Studio 2008
Visual Studio 2010
Visual Studio 2011
Visual Studio 2012
Visual Studio Tools for Office
VSX
WCF
Web Development (general)
Web Services
WebMatrix
WF
Whitepapers
Windows 7
Windows 8
Windows Azure
Windows Live
Windows Phone 7
Windows Phone SDK
Windows Server
Windows Vista
WinForms
WinRT
Workflow
WPF
XAML
Xiine Documentation
XML
XNA
XSLT



LearnNow


XAMALOT
 


SSWUG

Reader rating:
Click here to read 1 comment about this article.
Article source: CoDe (2004 - January/February)


Article Pages:  1  2 3 4 5 - Next >


Touring Base Class Library Enhancements

As the core API set underpinning managed application development in .NET, the Base Class Libraries, receive several long-awaited and notable additions in the Whidbey release.The Base Class Libraries (BCL) provide a standardized set of managed APIs to accomplish all of the common and most widely executed application tasks. BCL enhancements surface in as performance-based improvements, class-oriented feature additions, and the introduction of previously missing functionality through entirely new classes.

The Base Class Libraries were first introduced as a core component of the .NET Framework back in January 2002. The introduction of the BCL represented a huge step forward in simplicity and consistency of API design for application development. Through provision of a standard hierarchical design known as namespaces, the BCL removed many of the downsides but did not eliminate all of the need for leveraging unmanaged or third-party APIs.

"
The ability to leverage the Data Protection API (DPAPI) takes a dramatic step forward in Whidbey. The ProtectedData and ProtectedMemory classes simplify the process of encrypting data to a single line of code.
"

The .NET Framework 1.0/1.1 provided a BCL set that can be segmented into three functionality groups: a managed group, a managed wrappers group, and a support services group. The managed group contains classes consisting mostly of managed code implementations that replace unmanaged APIs. A perfect example of this is ADO.NET found in System.Data. The second group consists of managed wrappers around code or services still implemented as unmanaged code. An example of this can be found in the System.EnterpriseServices namespace that exposes COM+ Services to managed classes. The final functionality group provides support services to facilitate interoperability between the managed and unmanaged APIs. Many of these classes can be found in System.Runtime.InteropServices.

Many of the enhancements to the Whidbey BCL set focus on the managed group of classes. Although the interoperability support provided by the BCL allows seamless use of unmanaged code, providing similar functionality as true managed classes improves the performance, general ease of use, and reduces the dependency on proper installation of the underlying unmanaged code being replaced.

The Whidbey BCL offers new classes as well as new features for existing BCL classes that greatly simplify a number of common tasks. Some of these new classes can be considered information classes, designed to facilitate information acquisition. Some BCL enhancements provide improved network support or network-oriented features. Other BCL enhancements offer completely new functionality, some of which I'll describe below.

I can't cover all the changes to the BCL in this short space; I will cover some of the more important or noticeable areas of improvements. My article discusses the alpha version of the Whidbey BCL, which will continue to evolve, improve, and change as Microsoft moves through the alpha and beta process.

New Classes

Many of the new Whidbey BCL classes provide functionality directly through the .NET Framework that were previously available to developers only through COM interoperability and/or third-party APIs, or functionality that could be obtained through substantially less convenient avenues.

Obtaining Drive Information

One new BCL enhancement, the DriveInfo class which you'll find in the System.IO namespace, provides functionality similar to the FileInfo and DirectoryInfo classes already found in the System.IO namespace. DriveInfo provides methods and properties to query information about a current drive on the system or, through the shared GetDrives method, retrieves an array of DriveInfo objects representing all the logical drive names on a computer. Developers will typically use this class to determine available size, or total size, as shown in Figure 1, or to determine whether a drive is a hard disk, network share, or floppy drive. To retrieve information about the "C" drive, you could use code similar to the following:

Dim As New DriveInfo("C")
Console.WriteLine("Data for Drive C:")
Console.WriteLine("Avail: {0} bytes", _   
                   c.AvailableFreeSpace)
Console.WriteLine("Total Free: {0} bytes", _
                   c.TotalFreeSpace)
Console.WriteLine("Format: {0}", c.DriveFormat)
Console.WriteLine("Type: {0}", c.DriveType)
Console.WriteLine("Name: {0}", c.Name)
Console.WriteLine("Size: {0}", c.TotalSize)
Console.WriteLine("Label: {0}", c.VolumeLabel)

Click for a larger version of this image.

Figure 1: The DriveInfo class provides information about logical drives.

Use of the DriveInfo class allows upper- or lower-case logical names in the class constructor, but cannot be used on network shares with a UNC path.

&

By: Michael Thomas

Michael Lane Thomas, also known as the .NET Cowboy for his sometimes untamed, Wild West-style passion for .NET, has been a fixture in the development community for many years. A speaker at professional, academic, and Microsoft-internal technical conferences, Michael has been a primary contributor to 26 books, including a multi-year stint as .NET Series Editor for Wiley's/Hungry Minds, going back to the Beta days of .NET. Michael has spent time as industry analyst, commentator, and co-host of a weekly radio talk show. As an exam-junkie, Michael is currently the eighth most certified MCP in the world, passing a total of 62 exams to date. Michael is currently a Developer Evangelist for Microsoft and greatly enjoys exploring the Alpha bits for Whidbey as a Microsoft VS.NET Insider, and his role of daddy to his 1-year-old son Noah, also known as "Mr. Pinchy Cheeks."

mlthomas@microsoft.com

Fast Facts

Enhancements to the Base Class Library provide sought after functionality missing from the .NET Framework 1.1, including simplified DPAPI-based encryption classes and significant increases in Console class functionality.



Article Pages:  1  2 3 4 5 - Next Page: 'Generating Hash Values' >>

Page 1: Touring Base Class Library Enhancements
Page 2: Generating Hash Values
Page 3: Tracing to the Console
Page 4: Existing Class Enhancements
Page 5: Enhancing Network Support

How would you rate the quality of this article?
1 2 3 4 5
Poor      Outstanding

Tell us why you rated the content this way. (optional)

Average rating:
4.1 out of 5

14 people have rated this article.

Instantly Search Terabytes Of Text
“Lightning Fast”
– Redmond Mag
“Covers all data
sources” – eWeek
25+ fielded & full-text search options
dtSearch’s own document filters highlight hits in popular file types
Web Spider supports static & dynamic data
APIs for .NET, Java, C++, SQL, etc.
Win / Linux (64-bit & 32-bit)
www.dtSearch.com
 

      Sharepoint TechCon

 

Sharepoint TechCon