Guest User

Untitled

a guest
Aug 21st, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. public class Person
  2. {
  3. public string FirstName = string.Empty;
  4. public string LastName = string.Empty;
  5. public string Age = 0;
  6. // Other 20 to 30 properties.
  7. }
  8.  
  9. Person person = new Person()
  10. {
  11. FirstName = "Nithin",
  12. LastName = "B",
  13. Age = 24,
  14. // Other 20 to 30 properties.
  15. };
  16.  
  17. Console.WriteLine(person.FirstName);
  18.  
  19. var Person = function () {
  20. this.FirstName = "";
  21. this.LastName = "";
  22. this.Age = 0;
  23. };
  24.  
  25. var person = new Person();
  26. person.FirstName = "Nithin";
  27. person.LastName = "B";
  28. person.Age = 24;
  29.  
  30. console.log(person.FirstName);
  31. console.log(person["FirstName"]);
Add Comment
Please, Sign In to add comment