using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace winten { class Program { static void Main(string[] args) { TuShu ts = new TuShu(); Console.WriteLine("请输入您的电子邮箱"); ts.email = Console.ReadLine(); Console.WriteLine("请输入您的会员名"); ts.name = Console.ReadLine(); Console.WriteLine("请输入您的密码"); ts.pwd = Console.ReadLine(); ts.show(); Console.ReadLine(); } } }
1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 6 namespace winten 7 { 8 class TuShu 9 { 10 //电子邮箱 11 public string email; 12 //会员名 13 public string name; 14 //登录密码 15 public string pwd; 16 17 18 public void show() 19 { 20 Console.WriteLine("会员注册信息为: 电子邮箱为:{0},会员名为:{1},登录密码为:{2}",email,name,pwd); 21 } 22 23 24 } 25 }