码迷,mamicode.com
首页 > Windows程序 > 详细

C# 装箱

时间:2019-01-14 23:02:49      阅读:218      评论:0      收藏:0      [点我收藏+]

标签:rgs   拆箱   nbsp   using   .text   ogr   []   threading   task   

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            // 装箱
            int i = 3;
            object io = i;
            Console.WriteLine("i:{0},io:{1}", i, io.ToString());
            // 拆箱
            int j = (int)io;
            Console.WriteLine("这是j=" + j);
        }
    }
}

 

具体可看:https://www.cnblogs.com/dabiaoge/p/4112581.html

这里不抄录

C# 装箱

标签:rgs   拆箱   nbsp   using   .text   ogr   []   threading   task   

原文地址:https://www.cnblogs.com/namejr/p/10269188.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!