MCTS Certification: Exam Terms and Definitions

Microsoft Certification - Exam Help

  • Increase font size
  • Default font size
  • Decrease font size
Home > Widening Converting
MCTS - Exam 70-536: Widening Converting

Widening Converting

E-mail Print PDF

Widening Converting: What Is It And How To Use It?

Widening is used when converting from one type or conversation to another, or convert between two types. At its very root, this term is implying broadening of sorts… this can mean changing, exchange, adapting, altering, translating, switching, transfer, or even moving value, data (expanding), from one type into another/others.

It is not merely widening for the sake of converting, to ever-infinity. It is important that the destination in the end is compatible and can accommodate the ‘edits’, types, values. It is referred to as implicit conversions.

This can pertain to system, string and base. In the .NET framework, these inter-types conversions,  can be done automatically and built-in or customized. Any type can be a ‘reference type’ through the use of boxing (see elsewhere). For customization, specific implementation operators have to be used, to enact and put in place the successful transformation between types. Widening converting, makes it possible to compare and copy between values (of different types). Opposite of narrowing converting, used mostly if you do not want to lose precision (allowing assignment to/from  integer values for example). It is not automatic and has to be implemented through conversion operators, to create custom types. 
 

Key Exam Points

  1. Widening Converting is different for VB and C# - they differ considerably, but permitted. Both allow widening conversion, with a qualifier, IF the destination types can be accommodating all possible types and sources.
  2. Use practical, study and real-life examples, practice exercises/test, questions,  to work your way through this topic.

Related Terms

Narrowing, Boxing, Unboxing

 

This article is based on the 2nd edition of the Microsoft .Net Framework Application Training Kit with the purpose to help 70-536 Exam takers to succeed. I constantly look for ways to improve the content.   Please leave a comment about this article or drop me a message if you would like to see changes for this site.

Last Updated on Monday, 02 March 2009 20:06  
0 Votes