public class Person
{
private string Name;
private string FirstName;
public Person(string name, string firstname) => (Name, FirstName) = (name, firstname);
List<Person> listofPersons = new List<Person>();
listofPersons.AddRange(new List<Person>
{
new Person("John1", "Doe" ),
new Person("John2", "Doe" ),
new Person("John3", "Doe" ),
});
Page 1 / 1
public class Person
{
private string Name;
private string FirstName;
public Person(string name, string firstname) => (Name, FirstName) = (name, firstname);
List<Person> listofPersons = new List<Person>();
listofPersons.AddRange(new List<Person>
{
new Person("John1", "Doe" ),
new Person("John2", "Doe" ),
new Person("John3", "Doe" ),
}); class-id Person.
01 #Name string.
01 FirstName string.
method-id new(#name as string, firstname as string)
set self::Name to #name
set self::FirstName to firstname
end method.
end class.
declare listofPersons = new type List[type Person].
invoke listofPersons::AddRange(
table of type Person(
new Person("John1", "Doe")
new Person("John2", "Doe")
new Person("John3", "Doe")))
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.