Presentation is loading. Please wait.

Presentation is loading. Please wait.

Advanced.Net Framework 2.0 David Ringsell MCPD MCSD MCT MCAD.

Similar presentations


Presentation on theme: "Advanced.Net Framework 2.0 David Ringsell MCPD MCSD MCT MCAD."— Presentation transcript:

1 Advanced.Net Framework 2.0 David Ringsell MCPD MCSD MCT MCAD

2 INTRODUCTION

3 ABOUT THIS COURSE COURSE STYLE Content has some flexibility Opportunity to experiment – extend the labs Opportunity to share knowledge Opportunity to enhance team working Answer your questions using MSDN Help & Visual Studio. Contribute – attempt consultants questions Enjoy the course! Copyright David Ringsell 2007

4 TRAINING METHODS Talks with slides Practical Demonstrations Sample Code and exercises Questions and answers – both ways Discussions Training notes – add your own notes

5 Course Evaluation 1. What is the best thing about this course? 2. The course be will even better if? You can consider Pace Technical depth Content Balance of activities (labs, talks, demonstrations) Course Materials

6 Course Content Module 1: Creating Globalized Applications Module 2: Working with GDI+ in Windows-based Applications Module 3: Implementing Code Access Security Module 4: Implementing Cryptography Module 5: Interoperating Between COM Components and Assemblies Module 6: Working with Service Applications and Messages Module 7: Working with Type Metadata Module 8: Creating Multithreaded Applications and Application Domains

7 Module 1: Creating Globalized Applications

8 Overview Working with Culture Information by Using Globalization Classes Creating a Custom Culture Working with Primary Encoding Classes Working with Advanced Encoding Classes

9 Lesson 1: Working with Culture Information by Using Globalization Classes What Is Globalization? How Culture Information Is Accessed by Using the CultureInfo Class How Region Information Is Accessed by Using the RegionInfo Class How Date/Time Values in a Culture Are Formatted by Using the DateTimeFormatInfo Class How Numeric Values Are Formatted by Using the NumberFormatInfo Class How Culture Information Is Compared by Using the CompareInfo Class Discussion: How Culture Information Is Used

10 What Is Globalization? Designing a software application such that language and culture related content is separate from source code Globalization Supplying the resources required for the application and displaying everything in the user interface in the localized language Localization Verifying that a globalized application is ready for localization Localizability

11 How Culture Information Is Accessed by Using the CultureInfo Class Class that you can use to create global applications CultureInfo

12 How Region Information Is Accessed by Using the RegionInfo Class Class that represents specific country formats along with any customization defined in the Windows operating system RegionInfo

13 How Date/Time Values in a Culture Are Formatted by Using the DateTimeFormatInfo Class Class that helps manipulate the date/time values and formats them according to the region DateTimeFormatInfo mm/dd/yyyy

14 How Numeric Values Are Formatted by Using the NumberFormatInfo Class Class that helps format numeric values, in particular string formats depending on the culture NumberFormatInfo ,000

15 How Culture Information Is Compared by Using the CompareInfo Class Class that helps perform a comparison of the strings that follow any regional order CompareInfo

16 Lesson 2: Creating a Custom Culture Describe the Role of the CultureAndRegionInfoBuilder Class How a Custom Culture Is Built by Using the CultureAndRegionInfoBuilder Class Discussion: Creating Custom Cultures

17 Describe the Role of the CultureAndRegionInfoBuilder Class Class that helps you create a new culture based on certain formats and save the culture on the local computer or export it to an XML file CultureAndRegionInfoBuilder

18 How a Custom Culture Is Built by Using the CultureAndRegionInfoBuilder Class Dim custom As New CultureAndRegionInfoBuilder( " en- Custom ", CultureAndRegionModifiers.None) custom.LoadDataFromCultureInfo(New CultureInfo( " en-US " )) custom.NumberFormat.CurrencyDecimalDigits = 10 custom.NumberFormat.CurrencyDecimalSeperator = " - " Dim size As Integer() = New Integer(0) {4} custom NumberFormat.CurrencyGroupSizes = size custom.LoadDataFromRegionInfo(New RegionInfo( " US " )) custom.RegionEnglishName = " My Region English Name " custom.Register() Following code example displays the building of a custom culture by using the CultureAndRegionInfoBuilder class:

19 Lesson 3: Working with Primary Encoding Classes What Is Character Encoding? How Characters Are Encoded by Using the Encoding and EncodingInfo Classes How Characters Are Encoded by Using ASCII and Unicode Standards Discussion: Identifying the Features of ASCII and Unicode Encoding Classes

20 What Is Character Encoding? Process of converting a stream of text into a byte array mapped to a specific code page Encoding Process of converting a byte array mapped to a specific code page into a stream of text Decoding

21 How Characters Are Encoded by Using the Encoding and EncodingInfo Classes Class that is the base class from which the actual implementations derive Encoding Class that provides basic information about a specific encoding EncodingInfo

22 How Characters Are Encoded by Using ASCII and Unicode Standards Class that implements ASCII encoding and is not suited for sharing data between different languages ASCIIEncoding Class that performs Unicode UTF-8 encoding and recognizes all Unicode characters from different languages UTF8Encoding Class that represents the default encoding standard implemented by the.NET Framework 2.0 UnicodeEncoding

23 Lesson 4: Working with Advanced Encoding Classes How Failure Events Are Handled by Using the Encoder and EncoderFallback Classes How Failure Events Are Handled by Using the Decoder and DecoderFallback Classes Discussion: Identifying the Purpose of Advanced Encoding Classes

24 How Failure Events Are Handled by Using the Encoder and EncoderFallback Classes Class that converts a set of characters to a sequence of bytes Encoder Base class of the EncoderExceptionFallback and EncoderReplacementFallback classes EncoderFallback

25 How Failure Events Are Handled by Using the Decoder and DecoderFallback Classes Process of converting a stream of text into a byte array mapped to a specific code page Encoding Process of converting the coded page to the relevant byte array or stream of text Decoding Class that converts encoded bytes back into characters according to a specified encoding Decoder Base abstract class that provides an error- handling mechanism DecoderFallback

26 Lab: Creating Globalized Applications Exercise 1: Display Detailed Region Information and a Greeting for a Culture Exercise 2: List all the Cultures Available

27 Lab Discussion There may be many cultures available on your local system. However, where can you locate information about all the available culture codes, as well as additional information on culture, globalization, and localization standards? Do all cultures follow the same rules for indexing?

28 Review This module described: Working with culture information by using globalization classes Creating a custom culture Working with primary encoding classes Working with advanced encoding classes Working with culture information by using globalization classes Creating a custom culture Working with primary encoding classes Working with advanced encoding classes


Download ppt "Advanced.Net Framework 2.0 David Ringsell MCPD MCSD MCT MCAD."

Similar presentations


Ads by Google