Skip to content

Desi banjara

  • “Courage doesn’t always roar. Sometimes courage is the quiet voice at the end of the day, saying, “I will try again tomorrow.”– Mary Anne Radmacher Motivational & Inspirational Quotes
  • “To love oneself is the beginning of a lifelong romance.” Oscar Wilde Motivational & Inspirational Quotes
  • Microsoft AZ-900 Certification Exam Practice Questions – 6 Microsoft AZ-900 Certification Exam
  • “The friend in my adversity I shall always cherish most. I can better trust those who helped to relieve the gloom of my dark hours than those who are so ready to enjoy with me the sunshine of my prosperity.”– Ulysses S. Grant Motivational & Inspirational Quotes
  • C# Interview questions – How to get one/two year back from current date C# development
  • ASP.NET MVC: How to show html data from database to front end view Uncategorized
  • Entrepreneurship Inspirational Quotes Entrepreneurship
  • “Remember that happiness is a way of travel – not a destination.” – Roy M. Goodman Quotes

Interview question: What are the two types of data type in C#?

Posted on July 24, 2018 By DesiBanjara No Comments on Interview question: What are the two types of data type in C#?

There are two types of data type on C#: Value types and Reference types

Value Type:

A value type holds a data value within its own memory space. It means variables of these data types directly contain their values. They are derived from the class System.ValueType.

Example of value types: bool, byte, char, decimal, double, enum, float, int, long, sbyte, short, strut, uint, ulong, ushort.

When you declare an int type, the system allocates memory to store the value.

In terms of memory allocation, Value types are stored in the Stack.

Reference type

A reference type doesn’t store the actual data directly. Instead, it stores the address where the value is being stored. In other words, a reference type contains a pointer to another memory location that holds the data. If the data in the memory location is changed by one of the variables, the other variable automatically reflects this change in value.

Example of built-in reference types: object, string and dynamic.

In terms of memory allocation, Reference type are stored in the Heap.

[amazon_link asins=’007070368X,1787287041,1788478924,9351190900,8120349172,9351343189,1484213335,B016Z18MLG,8120352068′ template=’ProductCarousel’ store=’desibanjara22-21′ marketplace=’IN’ link_id=’5e6fb197-8f3f-11e8-81bb-8bbb244f188c’]

C# development, IT/Software development Tags:C#, C# development, Microsoft, Reference type, Value Type

Post navigation

Previous Post: Interview question: What are primitive data types in C#?
Next Post: Interview question: How does C# differ from C++?

Related Posts

  • Asp.Net WebApi Interview Questions – Cont. ASP.NET Web API
  • Interview question: What are the namespaces in C#.NET? C# development
  • C# Interview question: How encapsulation is implemented in C#? C# development
  • Interview question: Which class acts as a base class for all arrays in C#? C# development
  • C# Interview questions – How to get one/two year back from current date C# development
  • Interview question: What is the use of “using” keyword in C#? C# development

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *



Archives

  • February 2023
  • February 2022
  • June 2021
  • March 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • July 2020
  • June 2020
  • April 2020
  • December 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • April 2018
  • January 2018
  • September 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • August 2015
  • May 2015
  • April 2014
  • November 2013

Categories

  • Acer
  • Amazon AWS Certification Exam
  • Amazon Kindle
  • Android phones
  • ASP.Net MVC
  • ASP.NET Web API
  • AWS DevOps Engineer Professional Exam
  • AZ-300: Microsoft Azure Architect Technologies Exam
  • Azure Active Directory
  • Azure App Services
  • Azure Data Factory
  • Azure Logic Apps
  • Azure Mobile Apps
  • Azure Virtual Machine
  • Best Wishes Messages
  • birthday messages for boyfriend
  • Birthday messages For Girlfriend
  • Birthday Wishes
  • Birthday Wishes For Mom
  • Business
  • C# development
  • Cameras
  • Canon
  • Cloud
  • Cloud services
  • digital-cameras
  • Diwali
  • Entrepreneurship
  • eReaders
  • Family Quotes
  • Family Quotes
  • Friendship Quotes
  • Gadgets
  • Games
  • Get Well Soon Messages
  • GIT
  • Good Morning Wishes
  • Google
  • Gratitude Quote
  • Guru Nanak Jayanti
  • Halloween
  • Happiness Quote
  • Happy Diwali Wishes
  • Happy Independence Day Wishes
  • Happy New Year Wishes
  • HTC
  • HTC One
  • HTML
  • I Miss You Messages
  • Inspirational Quotes
  • Inspirational Travel Quotes
  • Interview questions
  • IT/Software development
  • Leadership Quote
  • Life lessons
  • Love Quotes
  • Love shayari
  • Messages
  • Microsoft AI-900 Certification Exam
  • Microsoft AZ-104 Certification Exam
  • Microsoft AZ-204 Certification Exam
  • Microsoft AZ-900 Certification Exam
  • Microsoft Azure
  • Microsoft Azure certifications
  • Microsoft Exam AZ-220
  • Microsoft Excel
  • Microsoft Office
  • Microsoft word
  • Mobile phones
  • Motivational & Inspirational Quotes
  • Nature Quotes
  • Nexus
  • Nikon
  • Pixels
  • PL-200: Microsoft Power Platform Functional Consultant Certification
  • PL-900: Microsoft Power Platform Fundamentals
  • postman
  • Quotes
  • Robin Sharma
  • Samsung Galaxy S5
  • Self improvement quotes
  • Self-Confidence Quote
  • SonarQube
  • Sony PlayStation 4
  • SQL
  • SQL Server
  • Success Quotes
  • Travel Quotes
  • Uncategorized
  • Uplifting Quotes
  • WCF (Windows Communication Foundation)
  • Web development
  • Wishes
  • Wishes for Newborn Baby

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org



Recent Posts

  • Azure Data Factory
  • What is Azure Active Directory?
  • Azure Virtual Machine
  • Azure Logic Apps
  • Azure Mobile Apps

Recent Comments

  • Yosianus on Error while sending json model in POST request to web API service using postman
  • “People are like stained-glass windows. They sparkle and shine when the sun is out, but when the darkness sets in their true beauty is revealed only if there is light from within.” Elisabeth Kübler-Ross Motivational & Inspirational Quotes
  • Happy Independence Day Wishes Happy Independence Day Wishes
  • Microsoft PL-900 Certification Exam Practice Questions – 1 PL-900: Microsoft Power Platform Fundamentals
  • “In times of great stress or adversity, it’s always best to keep busy, to plow your anger and your energy into something positive.”– Lee Iacocca Motivational & Inspirational Quotes
  • Interview question: What is encapsulation? C# development
  • How to fall in love? Gratitude Quote
  • 75 Best inspiring quotes on Leadership Business
  • 100+ Facebook/WhatsApp I Miss You Messages I Miss You Messages

Copyright © 2023 Desi banjara.

Powered by PressBook News WordPress theme