# Type Conversion

Changing a value from one data type to another compatible type.

## What is **Type Conversion** in C#?

**Type Conversion** — Changing a value from one data type to another compatible type.

```csharp
class TicketCounter
{
    void ConvertValues()
    {
        int tickets = 7;
        double exactTickets = tickets;
        int wholePrice = (int)7.9;
    }
}
```

Level: Novice · [More C# terms at this level](https://www.ask-codey.com/glossary/subjects/c-sharp/novice)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/type-conversion-c-sharp
