Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // C# class From MSDN: http://msdn.microsoft.com/en-us/library/aa288470(v=vs.71).aspx
- class Person
- {
- private string myName ="N/A";
- private int myAge = 0;
- // Declare a Name property of type string:
- public string Name
- {
- get
- {
- return myName;
- }
- set
- {
- myName = value;
- }
- }
- // Declare an Age property of type int:
- public int Age
- {
- get
- {
- return myAge;
- }
- set
- {
- myAge = value;
- }
- }
- }
- // F#: 1 line
- type Person = { Name:string; Age:int }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement