clsDictionary UserSetCLS = new clsDictionary();
public Dictionary<string, string> UserSetSTRING = new Dictionary<string, string>(); public Dictionary<string, int> UserSetINT = new Dictionary<string, int>();
UserSetCLS.UserSetINT.Add("UserID", _UserID); UserSetCLS.UserSetSTRING.Add("UserName", UserName); UserSetCLS.UserSetSTRING.Add("CapitalName", CapitalName);
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace Game{ public partial class frmCapitalCity : Form { clsDictionary UserSetCLS = new clsDictionary(); string CapitalName; public frmCapitalCity() { InitializeComponent(); } private void CapitalCity_Load(object sender, EventArgs e) { UserSetCLS.UserSetSTRING.TryGetValue("CapitalName", out CapitalName); } }}