---
title: "What is data type in c#?"  
description: "What is data type in c#?"  
author: "Pradeep kumar Patel"  
published: 2019-10-23  
updated: 2019-10-23  
canonical: https://answers.mindstick.com/qa/82393/what-is-data-type-in-c-sharp  
category: "programming language"  
tags: ["c#", ".net programming", "data types"]  
reading_time: 4 minutes  

---

# What is data type in c#?

What is [data type in c](https://answers.mindstick.com/qa/104691/what-is-a-data-type-in-c)#?

## Answers

### Answer by user

[Data](https://www.mindstick.com/articles/23186/how-becoming-a-data-analyst-can-be-a-lucrative-career) types specify the type of data that a valid c# variable can hold. C# is a strongly typed programming language because in c#, each type of data (such as integer, character, float, and so forth) is predefined as part of the programming language and all constants or variables defined for a given program must be described with one of the data types. **There are three types’ data Type in c#.**

1. Value data type.
2. Reference data type.
3. Pointer data type.

**Value Data Type:** The value data type are integer –based on floating-point based. C# language supports both signed and unsigned literals. There are two types of value data type in c#.

1. Predefined Data Types –such as Integer,Float ,Boolean,Decimal,etc.
2. User defined Data Types –such as Structure,Enumeration,etc.

**Reference Data Type:** The reference data types do not contain the actual data stored in a variable, but they contain a reference to the variables. If the data is changed by one of the variables, the other variable automatically reflects this change in value. **There are two types of reference data type in c #.**

- Predefined Data types-such as Objects,String.
- User defined Data types-such as Classes,Interface.

**Pointer Data Type:** The pointer in C# language is a variable, it is also known as locater or indicator that points to address of a value. **Symbol Name Description**

| **Symbol** \ | **Name** \ | **Description** \ |
| --- | --- | --- |
| **&** \ (ampersand sign) \ | Address operator \ | Determine the address of a variable. \ |
| ***** \ (asterisk sign) | Indirection operator \ \ | Access the value of an address. \ |

**Declaring a pointer**\
The pointer In c# language can be declared using * (asterisk symbol).

```
Int * a; //pointer to integer
Char * c; //pointer to character
```

\

### Answer by Pradeep kumar Patel

A data type specify type of data the variable can store such as character, integer, string, float etc. C# is a strongly typed programming language. It is essential to inform the compiler what kind of data these memory location will hold. In this page you will learn about the different data types that are supported in c#. **There are three types’ data in c#.** 1. Value data type. 2. Reference data type. 3. Pointer data type. **Value Data Type** : The value data type are integer –based on floating-point based. C# language supports both signed and unsigned literals. There are two types of value data type in c#. 1) Predefined Data Types –such as Integer,Float ,Boolean,Decimal,etc. 2) User defined Data Types –such as Structure,Enumrations,etc. **Reference Data Type** : The reference data types do not contain the actual data stored in a variable, but they contain a reference to the variables. If the data is changed by one of the variables, the other variable automatically reflects this change in value. There are two types of reference data type in c #. 1) Predefined Data types-such as Objects, String. 2) User defined Data types-such as classes, interface. **Pointer Data Type** The pointer in c# is a variable, it is also known as locator or indicator that points to an address of a value. Symbol Name Description & (ampersand sign) Address operator Determine the address of a variable. * (asterisk sign) Indirection operator Access the value of an address. **Declaring a pointer** The pointer in c# can be declared using * (asterisk symbol)

```
Int * a;       // pointer to int
Char * c;     // pointer to char
```

\


---

Original Source: https://answers.mindstick.com/qa/82393/what-is-data-type-in-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
