https://ithelp.ithome.com.tw/articles/10223905
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApp4
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Person person1 = new Person();
label1.Text = person1.Move(Direction.Right);
//可由下來判斷Direction.Right為Direction的Type
//label1.Text = ((Direction.Down).GetType()).ToString();
//////////////////////////////////////////////////////////
//Type t = typeof(Direction);
//label1.Text = t.Name;
//int i = 10;
//label1.Text = (i.GetType()).ToString();
}
}
}
沒有留言:
張貼留言