Ejemplo n.º 1
0
        public static Person Parse(string str)
        {
            var person = new Person();
            person.Name = str;

            return person;
        }
Ejemplo n.º 2
0
        static void Main()
        {
            Person person1 = new Person("Petur Pertov", 20);
            Console.WriteLine(person1);

            Person person2 = new Person("Petur Pertov", 20, "asd@");
            Console.WriteLine(person2);



        }
Ejemplo n.º 3
0
        public static Person Parse(string str)
        {
            var person = new Person {Name = str};

            return person;
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Use this function to initialise an instance of the Person class, with the name set to the argument passed.
 /// </summary>
 /// <param name="Input - Name to initialise the Person class with..."></param>
 /// <returns>An initialised instance of the Person script</returns>
 public static Person Parse(string input)
 {
     var person = new Person();
     person.name = input;
     return person;
 }