Click here to Skip to main content
12,299,648 members (47,012 online)
Click here to Skip to main content

Stats

1.3M views
2.4K downloads
587 bookmarked
Posted

Six important .NET concepts: Stack, heap, value types, reference types, boxing, and unboxing

, 14 May 2012 CPOL
An introduction to stack, heap, value types, reference types, boxing, and unboxing.
Source Code
WindowsBoxingUnBoxingPerformance
_UpgradeReport_Files
UpgradeReport_Minus.gif
UpgradeReport_Plus.gif
WindowsBoxingUnBoxingPerformance
Properties
obj
Debug
TempPE
bin
Debug
WindowsBoxingUnBoxingPerformance.exe
WindowsBoxingUnBoxingPerformance.vshost.exe
WindowsBoxingUnBoxingPerformance.vshost.exe.manifest
Backup
WindowsBoxingUnBoxingPerformance
Properties
namespace WindowsBoxingUnBoxingPerformance
{
    partial class Form1
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.btnUnboxandBox = new System.Windows.Forms.Button();
            this.btnSimpleVariableAssignment = new System.Windows.Forms.Button();
            this.lblBoxUnBox = new System.Windows.Forms.Label();
            this.lblSimple = new System.Windows.Forms.Label();
            this.SuspendLayout();
            // 
            // btnUnboxandBox
            // 
            this.btnUnboxandBox.Location = new System.Drawing.Point(12, 12);
            this.btnUnboxandBox.Name = "btnUnboxandBox";
            this.btnUnboxandBox.Size = new System.Drawing.Size(232, 23);
            this.btnUnboxandBox.TabIndex = 0;
            this.btnUnboxandBox.Text = "Unbox and Box";
            this.btnUnboxandBox.UseVisualStyleBackColor = true;
            this.btnUnboxandBox.Click += new System.EventHandler(this.btnUnboxandBox_Click);
            // 
            // btnSimpleVariableAssignment
            // 
            this.btnSimpleVariableAssignment.Location = new System.Drawing.Point(12, 65);
            this.btnSimpleVariableAssignment.Name = "btnSimpleVariableAssignment";
            this.btnSimpleVariableAssignment.Size = new System.Drawing.Size(232, 43);
            this.btnSimpleVariableAssignment.TabIndex = 1;
            this.btnSimpleVariableAssignment.Text = "Simple Variable Assignment";
            this.btnSimpleVariableAssignment.UseVisualStyleBackColor = true;
            this.btnSimpleVariableAssignment.Click += new System.EventHandler(this.btnSimpleVariableAssignment_Click);
            // 
            // lblBoxUnBox
            // 
            this.lblBoxUnBox.AutoSize = true;
            this.lblBoxUnBox.BackColor = System.Drawing.Color.Silver;
            this.lblBoxUnBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lblBoxUnBox.Location = new System.Drawing.Point(261, 15);
            this.lblBoxUnBox.Name = "lblBoxUnBox";
            this.lblBoxUnBox.Size = new System.Drawing.Size(57, 20);
            this.lblBoxUnBox.TabIndex = 2;
            this.lblBoxUnBox.Text = "label1";
            // 
            // lblSimple
            // 
            this.lblSimple.AutoSize = true;
            this.lblSimple.BackColor = System.Drawing.Color.Silver;
            this.lblSimple.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lblSimple.Location = new System.Drawing.Point(261, 75);
            this.lblSimple.Name = "lblSimple";
            this.lblSimple.Size = new System.Drawing.Size(57, 20);
            this.lblSimple.TabIndex = 3;
            this.lblSimple.Text = "label1";
            // 
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(505, 122);
            this.Controls.Add(this.lblSimple);
            this.Controls.Add(this.lblBoxUnBox);
            this.Controls.Add(this.btnSimpleVariableAssignment);
            this.Controls.Add(this.btnUnboxandBox);
            this.Name = "Form1";
            this.Text = "Form1";
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.Button btnUnboxandBox;
        private System.Windows.Forms.Button btnSimpleVariableAssignment;
        private System.Windows.Forms.Label lblBoxUnBox;
        private System.Windows.Forms.Label lblSimple;
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author


You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160525.2 | Last Updated 14 May 2012
Article Copyright 2010 by Shivprasad koirala
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid