Boxing and unboxing in C#

来源:互联网 发布:pdsoft洁净管道数据库 编辑:程序博客网 时间:2024/05/01 09:43

http://www.codeproject.com/Articles/2225/Boxing-and-unboxing-in-C
Converting a value type to reference type is called Boxing. Unboxing is the opposite operation and is an explicit operation.

class Test{static void Main() {int i = 1;object o = i;// boxingint j = (int) o;// unboxing}}


原创粉丝点击