Blog
    C#
    ADO.Net
    .NET
    ASP.Net & Web Forms
    Custom Controls
    Web Development
    Exception Handling
    XML
    Database
    Security in .Net
    Testing
    Web Services
    Windows Services
    Windows Controls
    WCF
    AJAX
    WPF
    XAML
    Reporting
    Setup
    VB.Net
    LINQ
    JQuery
    SilverLight
    JavaScript
    HTML5
    Crystal Report
    Cloud Computing
    Share Point
    Visual C++
    MVC
    Android
    PHP
    Java
    HTML
    WordPress
    Joomla
    Products
    Drupal
    Windows Phone
    JSON
    LightSwitch
    iPhone/iPad
    Ruby on Rails
    IIS 7
    Windows 8
    CSS/CSS3
    Excel
    MS Access
    Shortcut Keys
    Visual SourceSafe
    Team Foundation Server
    API(s)
    Sencha-Touch
Follow Us
Follow _MindStick_ on Twitter View MindStick Software's LinkedIn profile View MindStick Software's Facebook profile
Top Contributor
Advertisement
Advertise with Us
Mindstick
Article Article  Forum Forum  Blog Blog  Quiz Quiz  Beginner Beginner  Careers Careers  Contact Contact  Login Login  
Home | Product | Services | About Us | Interview | DeveloperSection | Submit an Article | Submit Blog
Report Abuse Form
Reason:    
 

Home >> C# >> Difference between value type and refernce type.
Difference between value type and refernce type.

In this blog I will tell you that what is difference between value type and refernce type.
Views: 1881     Comments: 1
by Awadhendra Tiwari on 6/13/2011

In this blog I will tell you some common differences between value types and reference types.

1)      Value types are those type of data type which will store value and reference type are those type of data type which will store addresses of variable rather than value.

2)      Value types are stored in stack part of memory while reference types are stored in heap part of memory.

3)      The default value which is initialized in value types are 0, false, ‘\0’ etc while in reference types the default value are initialize is null.

4)      When we assign the value of one value type variable to another type of variable then it simply copy value of variable and when we use assignment operator in case of reference variable then it copy address of variable rather than value.

5)      Following example represent value type variable.

int i=17; int j=I;

Following example will represents use of reference variable.

String sMessage=”Hello World”;

String sMessage1=sMessage;


Thanx
by Arush Raj on 7/13/2011
Thanx...Its help for my exm.
Report Abuse
Title :  
Comment :
Text ColorBackground Color
BoldItalicUnderline
LeftCenterRightJustify
Ordered ListBulleted List
IndentOutdent
Horizontal Rule
SubscriptSuperscript
HyperlinkImage
Design ModeDesign
View HtmlHtml
       
 
Report Abuse Form
Reason:    
 
Latest ArticleRSS Feed
    
    
    
    
    
    
    
    
    
    
More...
Latest Blogs by Awadhendra TiwariRSS Feed
    
    
    
    
    
    
    
    
    
    
More...
Top Viewed ArticlesRSS Feed
    
    
    
    
    
    
    
    
    
    
Top Viewed BlogsRSS Feed
    
    
    
    
    
    
    
    
    
    
Latest Interview QuestionsRSS Feed
    
    
    
    
    
    
    
    
    
    
More...
Total Online Users: 2636
  
Copyright © 2013MindStick. All Rights Reserved.