c# 类型 object
创建控制台程序文件:MyObject.cs
Code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace CSType
{
public class MyObject
{
public MyObject()
{
object o = new object();
Console.WriteLine(o.GetType());
//output System.Object
Console.ReadLine();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace CSType
{
public class MyObject
{
public MyObject()
{
object o = new object();
Console.WriteLine(o.GetType());
//output System.Object
Console.ReadLine();
}
}
}