Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace Person
- {
- public class Person
- {
- public Person(string name, int age)
- {
- this.Name = name;
- this.Age = age;
- }
- public string Name { get; set; }
- public int Age { get; set; }
- public override string ToString()
- {
- StringBuilder stringBuilder = new StringBuilder();
- stringBuilder.Append(String.Format("Name: {0}, Age: {1}",
- this.Name,
- this.Age));
- return stringBuilder.ToString();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement