Braintique.com header
Left Navigation Bar

C# Type Conversion

C# is a strongly typed language, which means that all variables have a type that must be declared, and that the compiler verifies the type-consistency of expressions. Expressions, of course, are always of a type built-in to the C# language, or are user-defined types.

For programmers coming to C# from a weakly typed language such as Visual Basic 6, strong typing and the programmatic type conversions that it mandates are one of the most difficult things about working in C#. But cheer up: working with type conversion is not brain surgery! After reading the two parts of this article, you should be able to zip through most issues involving C# type conversion.

The first part of this article explains strong typing and its rationale, shows how VB6 differs from VB.NET differs from C#.NET , describes the various possible type conversion techniques, and explains implicit conversion (also called implicit casting.) In the second part of the article, I’ll show you how explicit conversion, or casting, works. I’ll also discuss the as operator, the conversion methods that are members of the System.Convert class, and the ToString method.

Previous Table of Contents Next


Google
 
Web www.braintique.com
www.digitalfieldguide.com www.googleplexblog.com


Home | Barticles | Blogs | Books | Services | FAQ | Contact

© Braintique.com. All rights reserved.

Search Engine Optimization







RSS 2.0 Syndication feed

Syndication Viewer

Our Web host:
IX WebHosting



Food for Your Brain! Get a Barticle! Questions Answered Books for You What We Can Do For You Contact Us Brain Food Questions Answered Books for You What We Can Do For You Frequently Asked Questions About Us Google Research Photoshop Wi-Fi and Wireless Networking The Natural Way to Write