Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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;
- using System.IO;
- namespace Kadai02
- {
- public partial class FrmKen : Form
- {
- private const string ADDRESFILE = @"Z:\WinPro\Lesson04\都道府県.txt";
- public string kenmei;
- public FrmKen()
- {
- InitializeComponent();
- }
- private void FrmKen_Load(object sender, EventArgs e)
- {
- StreamReader sr = new StreamReader(ADDRESFILE);
- string line;
- while ((line = sr.ReadLine()) != null)
- {
- lstKen.Items.Add(line);
- }
- sr.Close();
- }
- private void btnKettei_Click(object sender, EventArgs e)
- {
- FrmMeiboToroku form1 = new FrmMeiboToroku();
- kenmei = lstKen.Text;
- this.Close();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement