---
title: "Type Conversion (Type casting) in C#"  
description: "In this article I am trying to elaborate the concept of type casting in C#."  
author: "Vijay Shukla"  
published: 2013-05-08  
updated: 2017-11-30  
canonical: https://www.mindstick.com/articles/1286/type-conversion-type-casting-in-c-sharp  
category: "c#"  
tags: ["c#"]  
reading_time: 2 minutes  

---

# Type Conversion (Type casting) in C#

In this [article](https://yourviews.mindstick.com/view/81489/kashmir-now-after-an-year-of-abrogation-of-article-370) I [am trying](https://answers.mindstick.com/qa/36834/which-two-programming-languages-should-i-master-in-if-i-am-trying-to-get-into-google-or-facebook) to elaborate the concept of [type casting](https://www.mindstick.com/articles/1823/objective-c-type-casting) in C#.

Type conversion is basically type casting, or converting one type of data to another type. In C#, type casting has two forms:

[Implicit](https://www.mindstick.com/interview/827/what-are-implicit-objects-list-them) type conversion - these conversions are performed by C# in a type-safe manner. Examples are conversions from smaller to larger integral types, and conversions from derived classes to base classes.

[Explicit type conversion](https://www.mindstick.com/forum/160325/explain-the-difference-between-implicit-and-explicit-type-conversion-in-javascript) - these conversions are done explicitly by users using the pre-[defined functions](https://answers.mindstick.com/qa/30986/what-is-user-defined-functions-what-kind-of-user-defined-functions-can-be-created). Explicit conversions require a cast operator.

C# Type Conversion Methods

C# provides the following built-in type conversion methods:

| ##### Methods | ##### Description |
| --- | --- |
| ## ToBoolean | Converts a type to a Boolean value, where possible. |
| ## ToByte | Converts a type to a byte. |
| ## ToChar | Converts a type to a single Unicode character, where possible. |
| ## ToDateTime | Converts a type (integer or string type) to date-time structures. |
| ## ToDecimal | Converts a [floating](https://www.mindstick.com/articles/85595/how-to-troubleshoot-when-your-floating-pond-fountain-is-not-working-properly) point or integer type to a decimal type. |
| ## ToDouble | Converts a type to a double type. |
| ## ToInt16 | Converts a type to a 16-bit integer. |
| ## ToInt32 | Converts a type to a 32-bit integer. |
| ## ToInt64 | Converts a type to a 64-bit integer. |
| ## ToSbyte | Converts a type to a signed byte type. |
| ## ToSingle | Converts a type to a small floating point number. |
| **[ToString](https://www.mindstick.com/interview/2259/what-is-the-difference-between-tostring-convert-tostring)** | Converts a type to a string. |
| ## ToType | Converts a type to a specified type. |
| ## ToUInt16 | Converts a type to an unsigned int type. |
| ## ToUInt32 | Converts a type to an unsigned long type. |
| ## ToUInt64 | Converts a type to an unsigned big integer. |

---

Original Source: https://www.mindstick.com/articles/1286/type-conversion-type-casting-in-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
