using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace demo框架
{
public partial class Form1 : Form
{
//枚举类型
public enum Gren {
男,
女
}
private void Form1_Load(object sender, EventArgs e)
{
Gren gren = Gren.男;
String s = "男";
Gren g = (Gren)Enum.Parse(typeof(Gren), s);
Console.WriteLine(g);
Console.ReadKey();
}
}
}