using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace StringBuilder与Appenf简单应用
{
class Program
{
static void Main(string[] args)
{
Person me = new Person("Abotrang","Wei","Cimppp"); //实例
me.WaiguoName(); //调用方法
Console.ReadKey();
}
}
class Person
{
public Person(string fn, string mn, string ln) //构造方法
{
this.first = fn;
this.middlet = mn;
this.last = ln;
}
private string first;
public string First //定义3个属性
{
get { return first; }
}
private string middlet;
public string Middlet
{
get { return middlet; }
}
private string last;
public string Last
{
get { return last; }
}
public void WaiguoName() //外国人名 如: “abcd a.m”
{
StringBuilder TAName = new StringBuilder(" ");//创建可变字符串 ---这个人的名字TAName